I returned, for testing i commented out the foreach loop and returned $staff, then $tips.... both arrays returned NULL when i did a var_dump(pointvalue($startdate));
can anyone see how this could be solved?
Cheers, dave ==================================================
function pointvalue($start){
$query = "SELECT * FROM Tips WHERE date >= $start and date <= ($start + INTERVAL 6 DAY) ";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$date = $row[Date];
$tips[$date] = $row[TotalTips];
}
$query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start + INTERVAL 6 DAY) ";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)){
$date = $row[Date];
if (isset($staff[$date])){
$staff[$date] = $staff[$date] + 1;
} else{ $staff[$date] = 1; }
} return $staff; }
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php