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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -