Support » Plugin: Track That Stat » 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=”″ 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=”″ and page_url=’’

Viewing 1 replies (of 1 total)
  • 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:


    There should be a comma before browser= to separate the field in the SQL statement:


Viewing 1 replies (of 1 total)
  • The topic ‘occasional SQL error’ is closed to new replies.