Hi All
I have a MySQL user logging script which inserts a new field when a user enters a page.
I have been loocking at the file and I've noticed something very strange:
SOMETIMES the script updates my 'query' field with the info which should go into the 'time_in' field next to it.
All pages call the same script and the same SQL statement for the update, and there doesn't seem to be any reason why it occasionally misses the right field (one user updated correctly and then three minutes later the next record got messed up).
My code (the only relevant bit) is here:
$sql_cont= "INSERT INTO visitor VALUES ('$id', '$cook', '$ip', '$refer', '$browse', '$timein, '$timedayin', '$date')";
$conn = mysql_connect($db_host,$db_user,$db_pass)
or die("Connection to database server failed");
$db = mysql_select_db($db_name,$conn)
or die("Selection of database failed");
$result_cont = mysql_query($sql_cont);
Thanks to anyone who throw any light on this bizarre behaviour.