Hi all,
I'd like to get all the information from my database that has been added in a certain month. My table does have a date field.
Could anyone help me here?
Thanks a lot, Mike
$today = date('Y-m-d'); $month_ago = date('Y-m-d', strtotime('1 month ago')); $sql = "SELECT * FROM table WHERE date BETWEEN '$month_ago' AND '$today'";
Thanks a lot, worked immediately 🙂