Having trouble getting this query to work, returns a null set from MySQL database, also any help on how to return array in quarters rather than 12 months would be appreciated,
Thanks
$month=1;
while ($month<13) {
$result= mysql_query("SELECT * FROM Events WHERE type='Movie' and date like '2002-$month-'"
$num_rows = mysql_num_rows($result);
echo $num_rows.",".$month."<br>";
$month++;
}
?>
Output should be either in format (12 months):
1,19,15,7,22,14,5,9,21,13,7,35
Or alternatively listed:
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
0,10
0,11
0,12
Thanks
$month=1;
while ($month<13) {
$result= mysql_query("SELECT * FROM Events WHERE type='Movie' and date like '2002-$month-'"
$num_rows = mysql_num_rows($result);
echo $num_rows.",".$month."<br>";
$month++;
}
?>
Output should be either in format (12 months):
1,19,15,7,22,14,5,9,21,13,7,35
Or alternatively listed:
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
0,10
0,11
0,12