Hi and thanks for the reply.
I now have my query like this:
mysql_select_db($database_bag, $bag);
$query_found = "SELECT f_bag, month(f_date) FROM amember_bag GROUP BY MONTH (f_date)";
$found = mysql_query($query_found, $bag) or die(mysql_error());
while ($row = mysql_fetch_assoc($found)) {
$f_month = $row['month(f_date)'];
$f_items = $row["f_baggage"];
}
I know what data is in the table which is:
f_bag------f_date
1-----------2007-06-01
1-----------2007-04-01
1-----------2007-08-01
1-----------2007-04-19
1-----------2007-04-24
1-----------2007-04-20
1-----------2007-04-16
1-----------2007-04-28
1-----------2007-04-21
This give me 7 records with a date month of april, 1 record with June and 1 record with August.
When I run the query the results are:
$bag------month(f_date)
1----------- 4 // April
1 ---------- 6 // June
1 ---------- 7 // I don't know where thsi is coming from
1 ---------- 8 // August
Then I want to be able to create 2 arrays:
one for $bag which hold "0" or "1" and an array for $month(f_date) which will hold the month part od the date.
I then need to use the content of both arrays to display the data in my graph as:
on the x axis display the month and on the y axis display the total $bag for that month.
I hope that this makes sense.
Many thanks again