Solved: Slight problem with mysql, php, and timestamps
Hello.
While trying to add a logging feature to record the current and previous pages of a logged in user, I came across a problem. Every time the page loads while logged in, the query causes an error:
Thank you,
Nicolai Guarino(ember).
Hello.
While trying to add a logging feature to record the current and previous pages of a logged in user, I came across a problem. Every time the page loads while logged in, the query causes an error:
I have tried everything I could think of at this point, and was unable to find a problem with the timestamps when I googled it. Any help would be appreciated. The code that triggers this is below: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 '.10 8.42 pm' at line 1
PHP:
$logquery = "INSERT INTO user_log (username, page, ip) VALUES ('$username', purchase.php, " . date('m.d.y g.i a') . "";
mysql_query($logquery) or die(mysql_error());
Nicolai Guarino(ember).
Last edited: