Okay, I tried that and I'm getting an invalid supplied argument.
This is what I have:
$week1 = "SELECT week((date(shift.sdate))),UNIX_TIMESTAMP(date(shift.sdate)), shift.sdate, sum(fast.level1), sum(fast.level2), sum(fast.level3), sum(fast.level4), sum(fast.sales), sum(fast.redeemed) from `fast`, `shift` Where sdate between $startdate and $enddate GROUP BY date(shift.sdate)";
$result=mysql_query($week1);
while ($row = mysql_fetch_array($result))
{
$prev=$row{'week(date(shift.sdate))'};
if ($row{'week(date(shift.sdate))'}=$prev){;
and formating info blah....//this should hopefully format the individul days that match the same week as the other//
}
else {
;
$weektotal="SELECT week((date(shift.sdate))), sum(fast.level1), sum(fast.level2), sum(fast.level3), sum(fast.level4), sum(fast.sales), sum(fast.redeemed) from `fast`, `shift` Where week(sdate) = $weeknumber group by week(sdate) LIMIT 0, 30 ";
$weektotallookup=mysql_query($weektotal);
while ($test=mysql_fetch_array($weektotallookup));{
// and this should inclide a row that has the sums fot the week.
However I'm getting an invalid arugement for $test.
I'm totally lost.
I've inlcuded a link to the entire code if it would help as a text file.
www.dvacole.com/famonthlyreport.txt