Getting mysql syntax error and cant find source
Posted
by eGGzy
on Stack Overflow
See other posts from Stack Overflow
or by eGGzy
Published on 2010-03-21T21:53:33Z
Indexed on
2010/03/21
22:01 UTC
Read the original article
Hit count: 164
I have function that updates log table.
function wslog($userID, $log, $where) {
safe_query("INSERT INTO ".PREFIX."log ( time, userID, log, where ) values( '".time()."', '".$userID."', '".$log."', '".$where."' ) ");
}
And I have this php code:
wslog($userID, 'server|'.mysql_insert_id().'', 'servers');
But I keep getting syntax error:
- Query failed: errorno=1064
- 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 'where ) values( '1269208030', '1', 'server|14', 'servers' )' at line 1
- query=INSERT INTO ws_DII_log ( time, userID, log, where ) values( '1269208030', '1', 'server|14', 'servers' )
© Stack Overflow or respective owner