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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -