'ello all.
I admit it ... I am not so hot with database functions.
Could someone teach me how to get 15 minutes before NOW()?
i.e. SELECT userID, page, ip, happened FROM tracker WHERE happened > NOW() - 1500 ORDER BY id DESC LIMIT 0,100
I think I need something like this:
SELECT userID, page, ip, happened FROM tracker WHERE happened > DATE_SUB(CONCAT(CURDATE(), CURTIME()), INTERVAL 15 MINUTE) ORDER BY id DESC LIMIT 0,100
I am not sure if the above works or not ... I don't get any errors, but nothing changes. Are both queries correct?
TIA!