Title: WP DB Error
Last modified: August 31, 2016

---

# WP DB Error

 *  Resolved [WHSajid](https://wordpress.org/support/users/whsajid/)
 * (@whsajid)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/wp-db-error-2/)
 * On a server running nginx, php-fpm(5.6.18) logged the following error on a fresh
   wp(4.4.2) install. The error is raised whenever we try to access the reports 
   page. The plugin appears to work fine though. Please note that php is in strict
   mode and no other errors have been logged. Great plugin, thanx.
 * 2016/02/22 10:27:02 [error] 1997#1997: *158048 FastCGI sent in stderr: “PHP message:
   WordPress database error You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘-
   10, 10’ at line 1 for query SELECT COUNT(1) AS Attempts, ClientIp FROM wp_gdbc_attempts
   WHERE SiteId = 1 GROUP BY ClientIp ORDER BY Attempts DESC LIMIT -10, 10 made 
   by do_action(‘wp_ajax_retrieveAttemptsPerClientIp’), call_user_func_array, GdbcReportsAdminModule-
   >retrieveAttemptsPerClientIp, GdbcDbAccessController::getAttemptsByClientIp, 
   GdbcDbAccessController::executePreparedQuery” while reading response header from
   upstream, client: 124.195.222.239, server: ***, request: “POST /wp-admin/admin-
   ajax.php?lang=dv HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”,
   host: “***”, referrer: “[http://****/wp-admin/admin.php?page=wp-bruiser-reports&#8221](http://****/wp-admin/admin.php?page=wp-bruiser-reports&#8221);
 * [https://wordpress.org/plugins/goodbye-captcha/](https://wordpress.org/plugins/goodbye-captcha/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [MihChe](https://wordpress.org/support/users/mihche/)
 * (@mihche)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/wp-db-error-2/#post-7091378)
 * Hi [@whsajid](https://wordpress.org/support/users/whsajid/)
    Thanks for reporting
   this to me! You are totally right. This will raise an error and it is not related
   to the php version or web server.
 * It is my mistake over there, not taking in consideration that page number starts
   with zero. It is an extremely quick fix.
    This is not affecting the plugin functionality
   at all. It is just related to the Reports section.
 * If you prefer I can send you a new version where this issue is fixed or you can
   wait until the next release.
 * Mihai
 *  Plugin Author [MihChe](https://wordpress.org/support/users/mihche/)
 * (@mihche)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/wp-db-error-2/#post-7091540)
 * Hi [@whsajid](https://wordpress.org/support/users/whsajid/),
    I’ve just pushed
   the version 2.2.1 fixing this issue. Thanks again for reporting this to me.
 * Cheers,
    Mihai
 *  Thread Starter [WHSajid](https://wordpress.org/support/users/whsajid/)
 * (@whsajid)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/wp-db-error-2/#post-7091558)
 * Hi,
 * Thank you for the quick fix. Once again, this is an amazing plugin. It’s easy
   on the server and works as advertised, without getting in the way. Great work
   guys, glad I could be of help.
 * Cheers,
 *  [sitebizniz](https://wordpress.org/support/users/sitebizniz/)
 * (@sitebizniz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/wp-db-error-2/#post-8585864)
 * Hi, I’m getting a similar error:
 * [23-Dec-2016 17:17:54 UTC] WordPress database error Table ‘trucksfo_wp.wp_gdbc_attempts’
   doesn’t exist for query SELECT Count(1) AS Hits, ClientIp FROM wp_gdbc_attempts
   WHERE CreatedDate > 1482513412 AND ( (ModuleId = 2 AND SectionId = 2) OR (ModuleId
   = 2 AND SectionId = 5) OR (ModuleId = 9 AND SectionId = 1) OR (ModuleId = 21 
   AND SectionId = 1) OR (ModuleId = 25 AND SectionId = 1) ) GROUP BY ClientIp made
   by require(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.
   php’), include_once(‘/plugins/goodbye-captcha/goodbye-captcha.php’), GdbcBruteGuardian::
   startGuarding, GdbcDbAccessController::getLatestLoginAttempts, GdbcDbAccessController::
   executePreparedQuery

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WP DB Error’ is closed to new replies.

 * ![](https://ps.w.org/goodbye-captcha/assets/icon-256x256.png?rev=1356325)
 * [WPBruiser {no- Captcha anti-Spam}](https://wordpress.org/plugins/goodbye-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/goodbye-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/goodbye-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/goodbye-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/goodbye-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/goodbye-captcha/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [sitebizniz](https://wordpress.org/support/users/sitebizniz/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/wp-db-error-2/#post-8585864)
 * Status: resolved