WordPress.org

Ready to get started?Download WordPress

Forums

Track That Stat
occasional SQL error (2 posts)

  1. don_alejandro
    Member
    Posted 1 year ago #

    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'

    http://wordpress.org/extend/plugins/track-that-stat/

  2. don_alejandro
    Member
    Posted 1 year ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.