Hello.

I have problem to solve in a school homework that I hope someone could
help me with. I have a small community, and the SQL statement below should
set all logged in users that has been inactive for more than 300 seconds
to 0 in the 'inloggad' field.  Though the getdate() does not seem to work,
I am using MySQL-3.23.55 in Linux. and mysql says:

You have an error in your SQL syntax near 'interval 10 second)
+0<(now()+0)' at line 1


$SQL = "UPDATE users SET inloggad=0,timestamp=timestamp WHERE inloggad=1
AND getdate(timestamp,interval 300 second) +0<(now()+0)";


Could someone help me?

Cheers, Martin



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to