Visitor counter issue
Posted: Mon Nov 13, 2006 11:01 pm
I would need some advice on how to manage visit counting using php & mysql.
Currently I'm using function "microtime()" to get the current time and store the value in FLOAT variable.
In mysql, the varible is stored as FLOAT UNSIGNED.
The problem is , I often get mysql error (duplicate key error). Logically microtime() is more than enough to get unique value for visit activity. Moreover I'm still testing it using single user account.
I'm wondering if there is more appropriate variable type to handle this issue.
thanks.
Currently I'm using function "microtime()" to get the current time and store the value in FLOAT variable.
In mysql, the varible is stored as FLOAT UNSIGNED.
The problem is , I often get mysql error (duplicate key error). Logically microtime() is more than enough to get unique value for visit activity. Moreover I'm still testing it using single user account.
I'm wondering if there is more appropriate variable type to handle this issue.
thanks.