I am trying to access a list of items from a table between to date values.
I have the following to set the dates
$fromdate = mktime(0,0,0,$frommonth,$fromday,$fromyear);
$todate = mktime(0,0,0,$tomonth,$today,$toyear);
then the following query
echo("$fromdate <br> $todate");
$query = "SELECT item_name, mc_gross, completed,
COUNT(*) countvalue
FROM ipn_tblsaleshistory
GROUP BY item_name
WHERE completed BETWEEN '$fromdate' AND '$todate'
";
I get the following output
1115330400
1118613600
couldn't execute query
any advice would be appreciated
- Rob