Hi,
I'm writing a reports system, for our helpdesk site, that will display data in a barchart format. I've read the PHPBUILDER article on 'Bar Charts With GD' by Stefan Wiesendanger, and wants to use that code to create the barchart.
I want to create 2 charts, one annual chart, that will pull the total number of support issues out for each month, and another that will put the number of issues out for each day in the specified month.
The Bar Charts article suggests using "SELECT COUNT(*) FROM table WHERE date LIKE '%-$month-%'" to count the data for a month, however, this would mean running 12 queries for the annual chart, and upto 31 for the monthly chart.
Is there a faster/more efficient way of pulling the data out of mysql?
Any comments or suggestions much appreciated!
Thanks
Ben