please help me construct this MYSQL Query (date / time)

Posted by sebb on Stack Overflow See other posts from Stack Overflow or by sebb
Published on 2010-05-31T19:10:29Z Indexed on 2010/05/31 19:13 UTC
Read the original article Hit count: 259

Filed under:

Hi there i would like to construct a query that fetches results that occurred between NOW and 15 minutes ago, im getting a mysql error when I try the following , can you help me? thanks

SELECT *
WHERE user_id = '000'
AND date_time < now( )
AND date_time > DATE_SUB( now( ) , INTERVAL 15 MINUTE) 

© Stack Overflow or respective owner

Related posts about mysql