i have this SQL query:
where datetime < DATE_ADD(DATE(now()), INTERVAL 15 DAY) order by datetime ASC
is this the right query to say where datetime is 15 days or more ago?
i have this SQL query:
where datetime < DATE_ADD(DATE(now()), INTERVAL 15 DAY) order by datetime ASC
is this the right query to say where datetime is 15 days or more ago?
You should use DATE_SUB instead:
where datetime < DATE_SUB(DATE(now()), INTERVAL 15 DAY) order by datetime ASC
See here for documentation.