Hi, I have what I hope will be a quick and easy question.
I am trying to select all records from a table called prod_enroll that were last updated on yesterday's date
This query works, but I was just wondering if there wouldn't be a more elegant way to accomplish this?
The last_update is a datetime field, but the time is irrelevant for this query.
$sql = " SELECT mem_id FROM prod_enroll WHERE date(last_update) > DATE_ADD(CURDATE(), INTERVAL -2 DAY) AND date(last_update) < CURDATE() AND rel_code = 'E' ";
Any suggestions would be greatly appreciated.