1 day before now() code example
Example 1: mysql where one year ago
select *
from orders
where order_date >= DATE_SUB(NOW(),INTERVAL 1 YEAR);
Example 2: mysql interval 1 day
SELECT * FROM FOO
WHERE MY_DATE_FIELD >= NOW() - INTERVAL 1 DAY
select *
from orders
where order_date >= DATE_SUB(NOW(),INTERVAL 1 YEAR);
SELECT * FROM FOO
WHERE MY_DATE_FIELD >= NOW() - INTERVAL 1 DAY