Title: SQL errors in php errorlog after update
Last modified: March 5, 2018

---

# SQL errors in php errorlog after update

 *  Resolved [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/)
 * When adding a filter (by clicking on a link in “top web pages”) and then removing
   that filter something breaks, leaving graph and data empty and spitting out an
   SQL error in the PHP errorlog;
 *     ```
       2018/03/05 15:50:09 [error] 984#984: *2623995 FastCGI sent in stderr: "PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s AND dt BETWEEN 1517702400 AND 1520268609' at line 3 for query 
       			SELECT COUNT(id) counthits
       			FROM wp_slim_stats
       			WHERE resource = %s AND dt BETWEEN 1517702400 AND 1520268609 made by do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, wp_slimstat_admin::init, wp_slimstat_reports::init, wp_slimstat_db::count_records, wp_slimstat_db::get_var" while reading response header from upstream, client: 94.109.180.81, server: autoptimize.com, request: "POST /wp-admin/admin.php?page=slimview2 HTTP/2.0", upstream: "fastcgi://unix:/var/lock/php-fpm-7.0-sftp_eej2maez:", host: "xyz", referrer: "xyz.com/wp-admin/admin.php?page=slimview2"
       ```
   
 * Clicking on “reset all” fixes things.
 * frank

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

 *  Plugin Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/#post-10041025)
 * Hi Frank,
 * would you be able to elaborate on how to reproduce this issue?
 * Thank you,
    Jason
 *  Thread Starter [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/#post-10041212)
 * sure:
    -> go to slimstat overview (works) -> from “top web pages” select a specific
   page (works) -> click on “remove filter for permalink”, resulting in breakage:
 * the graph shows “no data to display” and an SQL error is logged in the php errorlog.
 * frank
 *  Thread Starter [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/#post-10043054)
 * well, I just did the same and … it works. no more SQL error, no blank graph. 
   weird.
 *  Plugin Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/#post-10045551)
 * Your browser must have cached the old javascript library. Good that this is resolved
   now! Also because we could not reproduce the issue on our end.
 * Thank you for being on top of these things!
    Jason

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

The topic ‘SQL errors in php errorlog after update’ is closed to new replies.

 * ![](https://ps.w.org/wp-slimstat/assets/icon.svg?rev=2832242)
 * [SlimStat Analytics](https://wordpress.org/plugins/wp-slimstat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-slimstat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-slimstat/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-slimstat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-slimstat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-slimstat/reviews/)

## Tags

 * [sql-error](https://wordpress.org/support/topic-tag/sql-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/sql-errors-in-php-errorlog-after-update/#post-10045551)
 * Status: resolved