sql - How can I select rows from a table for specific time ago in php? -
i want select rows table added date< today-15
days in php or sql.
example:
select * order date_added< (now()-15days).
how can this?
you might want use date
, strtotime
function
$fiftendaysago = date('ymd',strtotime("-15 days"));
and query
$sql = "select * order date_added< '$fiftendayago' ";
Comments
Post a Comment