php - Select * to table where datetime is 24 hours ago -


i need select data in table created not less 24 hours ago. know how this?

assuming table has datetime field, in example called date_field

select * tablename date_field >= subdate( now(), interval 24 hour) 

or

select * tablename date_field > now() - interval 1 day 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -