Time difference in mysql
I want to get the records from mysql data base based on time.
I have lastquery_date
column in my table开发者_高级运维 every time update the date and time in that column.
I want to get time difference with current date is less than 12 mins
How can i get this query..
Please help me
see the link below and develop your own logic :)
TIMEDIFF
Your question is not entirely clear, but I think this is what you want:
SELECT *
FROM your_table
WHERE lastquery_date >= NOW() - INTERVAL 12 MINUTE
精彩评论