Title: occasional SQL error
Last modified: August 20, 2016

---

# occasional SQL error

 *  [don_alejandro](https://wordpress.org/support/users/don_alejandro/)
 * (@don_alejandro)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/occasional-sql-error/)
 * I just put Track That Stat on a new blog that has virtually no traffic yet (except
   for bots and me). About once a day (seems like it happens the first time I go
   to the site) I get an SQL error. I don’t see any more errors after that if I 
   refresh or look at other pages. Curiously, I have not seen this problem on another
   site which has much more traffic.
 * The SQL error is a missing comma after page_id=”-1″:
 * 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‘
   browser=”Firefox 18″,platform=”WinXP” where ip_address=”50.121.196.158″ and page’
   at line 1]
    UPDATE wp_tts_visitors SET time_last_visited=”1360223580″,num_visits
   =num_visits+1,page_id=”-1″browser=”Firefox 18″,platform=”WinXP” where ip_address
   =”50.121.196.158″ and page_url=’[http://spectrumz.com&#8217](http://spectrumz.com&#8217);
 * [http://wordpress.org/extend/plugins/track-that-stat/](http://wordpress.org/extend/plugins/track-that-stat/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [don_alejandro](https://wordpress.org/support/users/don_alejandro/)
 * (@don_alejandro)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/occasional-sql-error/#post-3445994)
 * The SQL error is happening once per day, the first time I view my site. perhaps
   triggered by my being the first non-robot visitor of the day, or the first logged-
   in visitor (admin).
 * The error is in line 692 of trackthatstat.php:
 * …,page_id=\””.$post_id.”\”browser=\””.$browser_os_info…
 * There should be a comma before browser= to separate the field in the SQL statement:
 * …,page_id=\””.$post_id.”\”,browser=\””.$browser_os_info…

Viewing 1 replies (of 1 total)

The topic ‘occasional SQL error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/track-that-stat.svg)
 * [Track That Stat](https://wordpress.org/plugins/track-that-stat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/track-that-stat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/track-that-stat/)
 * [Active Topics](https://wordpress.org/support/plugin/track-that-stat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/track-that-stat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/track-that-stat/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [don_alejandro](https://wordpress.org/support/users/don_alejandro/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/occasional-sql-error/#post-3445994)
 * Status: not resolved