Help with MYSQL datediff
Posted: Wed May 12, 2010 6:02 pm
Hey im trying to make my query return how many seconds have passed from a time stamp to NOW() but i cannot get it to work, this is what i tried:
Any one know where i went wrong ?
Hope you can help thanks!
SQL: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 'User1Time) AS User1Passed,SECOND(NOW()User2Time) AS User2Passed FROM' at line 1
Code: Select all
SELECT
*,SECOND(NOW(),User1Time) AS User1Passed,SECOND(NOW(),User2Time) AS User2Passed
FROM tablename()Hope you can help thanks!