开发者

Time difference in mysql

开发者 https://www.devze.com 2023-02-18 09:01 出处:网络
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 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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号