CheergycrycLe
New Member
I would like to take surveys (2 or more choices), and place the results in a table. I just want to know how I would tally up the results in a sql query.Even more, should i be doing the math within the query, or just use PHP to do the math?ExampleQuestions Table\[code\]question_id (int)question (text)answer_1 (varchar)answer_2 (varchar)answer_3 (varchar)etc...\[/code\]Answers Table\[code\]answer_id (int)question_id (int)answer (int) The answer they chose. (1, 2, 3, etc.)\[/code\]How would/should I tally up the results?Edit: using MySQL, PHP. The difference between the answers (45% said blah, 50% said blah blah, 5% said bloch). Not for homework, Im EE, not CS