Darkmoon Darkmoon - 2 years ago 98
SQL Question

Fetch mysql inserted data from yesterday 14:00 till now

I am writing a php page and I want to fetch all rows inserted in mysql table from yesterday at 14:00 till current time, I tried many queries and functions in mysql but it didn't help, appreciate any help in this regard.


Answer Source

below is the right answer

WHERE updated_at >= concat(subdate(CURDATE(), 1),' 09:00:00')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download