psychohagis Posted January 10, 2007 Share Posted January 10, 2007 I have the following code:[code]$timeout = time() - 1200;$setoffline = "UPDATE users SET online=0 WHERE online=1 AND lasttime='$timeout'";if (!@mysql_query($setoffline)) {echo 'Error: ' . mysql_error();}[/code]and i get the following problem:[quote]Error (set status): 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 '<='1168466894', lastpage='his/her homepage' WHERE id='1'' a [/quote] Quote Link to comment Share on other sites More sharing options...
Seamless Posted January 10, 2007 Share Posted January 10, 2007 hi, i'm not an expert but i don't think the error you have quoted relates to the code you are showing. but regarding the error you are showing (correct me if i am wrong) doesn't the less than or equal to have to be like this:=<Seamless. Quote Link to comment Share on other sites More sharing options...
Barand Posted January 10, 2007 Share Posted January 10, 2007 "<= " is fine. I agree about the code not showing the query that the error relates to Quote Link to comment Share on other sites More sharing options...
psychohagis Posted January 10, 2007 Author Share Posted January 10, 2007 oh dont worry i've fixed it now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.