Question
MySQL and CFchart
This is mainly a mysql problem but I may have more questions
about cfchart shortly so this way I can keep things in one place.
I've simplified some of what is below for ease of reading and
clarity.
I have a web form for customer feedback where customers leave a rating (N/A, Poor, Good, Excellent) and I'm trying to create pie charts to summarise the comments.
I have a database with 5 fields - commentID, Service, Value, Information, Overall
I can produce a pie chart for each field using the query
SELECT service, count(service) as countService FROM feedback GROUP BY service
and repeat of this query for value, information and overall
I've then got 4 pie charts, one for each query. So far so good.
What I would like to do now is to create a "total" graph (total is the working name so it won't be confused with the earlier overall). Is there any way to query the database to gather all of the fields into one field which can then be grouped and counted.
E.g. (this doesn't work but probably (hopefully) explains it better than the waffle above)
SELECT service as total, value as total, overall as total, information as total, count(total) FROM feedback GROUP BY total
Thanks
Michael
I have a web form for customer feedback where customers leave a rating (N/A, Poor, Good, Excellent) and I'm trying to create pie charts to summarise the comments.
I have a database with 5 fields - commentID, Service, Value, Information, Overall
I can produce a pie chart for each field using the query
SELECT service, count(service) as countService FROM feedback GROUP BY service
and repeat of this query for value, information and overall
I've then got 4 pie charts, one for each query. So far so good.
What I would like to do now is to create a "total" graph (total is the working name so it won't be confused with the earlier overall). Is there any way to query the database to gather all of the fields into one field which can then be grouped and counted.
E.g. (this doesn't work but probably (hopefully) explains it better than the waffle above)
SELECT service as total, value as total, overall as total, information as total, count(total) FROM feedback GROUP BY total
Thanks
Michael
