Title: SQL syntax database error possibly being generated by StatPress Visitors
Last modified: August 20, 2016

---

# SQL syntax database error possibly being generated by StatPress Visitors

 *  [mviens](https://wordpress.org/support/users/mviens/)
 * (@mviens)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sql-syntax-database-error-possibly-being-generated-by-statpress-visitors/)
 * I was checking my error logs and finding an extensive list of errors which appear
   to be generated by the StatPress Visitors plugin. The errors correspond to when
   I log in and review info in StatPress.
 * I just updated to the latest v1.5.4 but that didn’t resolve the issue.
 * Below is a sample of the error – this error states “line 4” but I also get similar
   error messages for “lines 5, 6 and 9”.
 *     ```
       [Fri Mar 22 17:13:41 2013] [error] [client ##.##.##.###] 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 '' at line 4 for query SELECT date, time, ip, urlrequested, feed, language, country, post_title\r\n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE feed<>''\r\n\t\t\tORDER BY id DESC LIMIT ; made by do_action('toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_feeds, referer: http://www.companyname.com/wp-admin/admin.php?page=statpress-visitors/action=spybot
       ```
   
 * Thank you for any recommendations.
 * Michael
 * [http://wordpress.org/extend/plugins/statpress-visitors/](http://wordpress.org/extend/plugins/statpress-visitors/)

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

 *  Plugin Author [luciole135](https://wordpress.org/support/users/luciole135/)
 * (@luciole135)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sql-syntax-database-error-possibly-being-generated-by-statpress-visitors/#post-3588820)
 * In fact, I had not fully debugged statpress, the new version will be.
    Even with
   these errors it works fine.
 * Copy here the line 4, please.
 *  Thread Starter [mviens](https://wordpress.org/support/users/mviens/)
 * (@mviens)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sql-syntax-database-error-possibly-being-generated-by-statpress-visitors/#post-3588878)
 * Hi Luciole,
 * Thanks for responding. Yes, the plug-in is working fine, I was just concerned
   with the amount of errors being generated.
 * Here is a bit more of a sampling of the errors:
    `[Fri Mar 22 19:42:21 2013] [
   error] [client xx.xxx.xxx.xxx] 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 '' at line 5 for query SELECT date, time, ip,
   urlrequested, os, browser,feed,user, language, country, post_title\r\n\t\t\tFROM
   wp_statpress\r\n\t\t\tWHERE (os<>'' OR browser <>'')\r\n\t\t\t\tAND`spider`NOT
   LIKE '%Spam Bot%'\r\n\t\t\tORDER BY id DESC LIMIT ; made by do_action('toplevel_page_statpress-
   visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_hits,
   referer: http://www.companyname.com/wp-admin/` `[Fri Mar 22 19:42:21 2013] [error][
   client xx.xxx.xxx.xxx] 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 '' at line 4 for query SELECT date, time, ip, urlrequested,
   referrer, search, searchengine, os, language, country\r\n\t\t\tFROM wp_statpress\
   r\n\t\t\tWHERE search<>''\r\n\t\t\tORDER BY id DESC LIMIT ; made by do_action('
   toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main,
   luc_main_table_latest_search, referer: http://www.companyname.com/wp-admin/` `[
   Fri Mar 22 19:42:21 2013] [error] [client xx.xxx.xxx.xxx] 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 '' at line 7 for
   query SELECT date, time, ip, referrer, urlrequested, os, language, country\r\
   n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE (referrer NOT LIKE 'http://www.companyname.
   com%')\r\n\t\t\t AND spider = ''\r\n\t\t\t\tAND referrer <>''\r\n\t\t\t\tAND 
   searchengine = ''\r\n\t\t\tORDER BY id DESC LIMIT ; made by do_action('toplevel_page_statpress-
   visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_referrers,
   referer: http://www.companyname.com/wp-admin/`
 *     ```
       [Fri Mar 22 19:42:21 2013] [error] [client xx.xxx.xxx.xxx] 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 '' at line 4 for query SELECT date, time, ip, urlrequested, feed, language, country, post_title\r\n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE feed<>''\r\n\t\t\tORDER BY id DESC LIMIT ; made by do_action('toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_feeds, referer: http://www.companyname.com/wp-admin/
       [Fri Mar 22 19:42:21 2013] [error] [client xx.xxx.xxx.xxx] 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 '' at line 6 for query SELECT date, time, ip, urlrequested, spider, agent\r\n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE spider<>''\r\n\t\t\t\tAND spider NOT LIKE '%spam bot'\r\n\t\t\tORDER BY id DESC\r\n\t\t\tLIMIT ; made by do_action('toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_spiders, referer: http://www.companyname.com/wp-admin/
       [Fri Mar 22 19:42:21 2013] [error] [client xx.xxx.xxx.xxx] 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 '' at line 5 for query SELECT date, time, ip, urlrequested, spider, agent\r\n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE spider LIKE '%spam bot'\r\n\t\t\tORDER BY id DESC\r\n\t\t\tLIMIT ; made by do_action('toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_spambots, referer: http://www.companyname.com/wp-admin/
       [Fri Mar 22 19:42:21 2013] [error] [client xx.xxx.xxx.xxx] 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 '' at line 9 for query SELECT date, time, ip, agent ,COUNT(ip) AS ipcount\r\n\t\t\tFROM wp_statpress\r\n\t\t\tWHERE (os=''\r\n\t\t\t\tOR browser='')\r\n\t\t\t\tAND searchengine=''\r\n\t\t\t\tAND spider=''\r\n\t\t\tGROUP BY ip,agent\r\n\t\t\tORDER BY id DESC\r\n\t\t\tLIMIT ; made by do_action('toplevel_page_statpress-visitors/admin/luc_admin'), call_user_func_array, luc_main, luc_main_table_latest_undefagents, referer: http://www.companyname.com/wp-admin/
       ```
   

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

The topic ‘SQL syntax database error possibly being generated by StatPress Visitors’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/statpress-visitors.svg)
 * [StatPress Visitors](https://wordpress.org/plugins/statpress-visitors/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/statpress-visitors/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/statpress-visitors/)
 * [Active Topics](https://wordpress.org/support/plugin/statpress-visitors/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/statpress-visitors/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/statpress-visitors/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mviens](https://wordpress.org/support/users/mviens/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/sql-syntax-database-error-possibly-being-generated-by-statpress-visitors/#post-3588878)
 * Status: not resolved