Hi developpers,
I need to generate reports in three ways:
I have a Date field in my database...
today
$query = 'SELECT * FROM 'table' WHERE Date = today';
Past seven days
$query = 'SELECT * FROM 'table' WHERE Date - 7';
Choose month( drop down preferably)
$query = 'SELECT * FROM 'table' WHERE Date = "'.$_POST['monthselected'].'"';
Please help on how to do the SQLs based on date
I need to generate reports in three ways:
I have a Date field in my database...
today
$query = 'SELECT * FROM 'table' WHERE Date = today';
Past seven days
$query = 'SELECT * FROM 'table' WHERE Date - 7';
Choose month( drop down preferably)
$query = 'SELECT * FROM 'table' WHERE Date = "'.$_POST['monthselected'].'"';
Please help on how to do the SQLs based on date
Comment