MYSQL query to get all entries with specific time, from PHP?
- by meds
I'm trying to query a mysql table which places its date in the following format: yyyy-mm-dd hh:mm:ss
So it's date and time, and that's all in a single field.
Now from php I want to get the time and query the table to only return entries where the date field is less than 24 hours old.
I'm having issues with the system because PHPs get time seems to return the values seperately and I'm struggling to figure out how to make it work with mysql queries.
This seems fairly simple but I'm quite new to php so sorry if I'm completely missing something..