{"id":10040806,"date":"2018-03-05T15:56:21","date_gmt":"2018-03-05T15:56:21","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/sql-errors-in-php-errorlog-after-update\/"},"modified":"2018-03-05T15:56:21","modified_gmt":"2018-03-05T15:56:21","slug":"sql-errors-in-php-errorlog-after-update","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/sql-errors-in-php-errorlog-after-update\/","title":{"rendered":"SQL errors in php errorlog after update"},"content":{"rendered":"<p>When adding a filter (by clicking on a link in &#8220;top web pages&#8221;) and then removing that filter something breaks, leaving graph and data empty and spitting out an SQL error in the PHP errorlog;<\/p>\n<pre><code>\n2018\/03\/05 15:50:09 [error] 984#984: *2623995 FastCGI sent in stderr: &quot;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 &#039;%s AND dt BETWEEN 1517702400 AND 1520268609&#039; at line 3 for query \n\t\t\tSELECT COUNT(id) counthits\n\t\t\tFROM wp_slim_stats\n\t\t\tWHERE resource = %s AND dt BETWEEN 1517702400 AND 1520268609 made by do_action(&#039;init&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, wp_slimstat_admin::init, wp_slimstat_reports::init, wp_slimstat_db::count_records, wp_slimstat_db::get_var&quot; while reading response header from upstream, client: 94.109.180.81, server: autoptimize.com, request: &quot;POST \/wp-admin\/admin.php?page=slimview2 HTTP\/2.0&quot;, upstream: &quot;fastcgi:\/\/unix:\/var\/lock\/php-fpm-7.0-sftp_eej2maez:&quot;, host: &quot;xyz&quot;, referrer: &quot;xyz.com\/wp-admin\/admin.php?page=slimview2&quot;<\/code><\/pre>\n<p>Clicking on &#8220;reset all&#8221; fixes things.<\/p>\n<p>frank<\/p>\n","protected":false},"template":"","class_list":["post-10040806","topic","type-topic","status-publish","hentry","topic-tag-sql-error"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10040806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10040806\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10040806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}