List:General Discussion« Previous MessageNext Message »
From:Martin Ostlund Date:March 4 2003 8:34pm
Subject:getdate
View as plain text  
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


Thread
getdateMartin Ostlund4 Mar