counting specific responses

admin

Administrator
Staff member
I have a database in mySQL that stores the information from a poll we have on our main page. The poll has multiple options, and inserts the user's repsones into a field called "charac" in our database. The field "charac" then contains multiple different responses.

In our analysis of the poll at the end of the month, I want to be able to count the specific responses based on the response. So, I want php to be able to look at my database, and count the number of "response1" and give feedback, and then count the number of "response2", and so forth. (remember all of the responses are stored in the same field, regardless of the actual value of the response).

How do I do this? I've tried several things- and none of them are working.
Thanks!

Jeof Oyster

PS- on the side, can you run an "If" statement from inside a "while" ?
 
Back
Top