I need to get the records which are inserted in last 24 hours. I have read about it and got that I need to use DATETIME type in my MySQL date column.
But my problem is I don’t know how to generate date for MySQL DATETIME type with PHP ?
How can I do this? Thanks in advance.
I need to get the records which are inserted in last 24 hours. I
Share
Simply
Because
DATETIMEin mysql isYYYY-MM-DD HH:ii:ss