Getting values only after one day has passed

I have a datetime field in my table column and would like to check when one whole day has passed from the date time stored in that column.

How will I do that is there a php code or mysql code I can use

I would like to know whetther we can compare two date variables that is If($currentdate > $previousdate){} If this can be dome then I can run the statements in the condition

php function date_diff.

Look at mysql’s date_add/date_sub or interval functionality built into mysql.

dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add

You can achieve it with:




SELECT date_field - INTERVAL 1 DAY;