We do it this way Table for responses ID EventID ParticipantID EvaluationID EvalQuestionID Response
Then we query & total by EvaluationID and EvalQuestionID -----Original Message----- From: Craig Thomas [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:47 AM To: CF-Talk Subject: RE: survey trouble wouldn't this mandate a table to store totals for each question? -----Original Message----- From: James Maltby [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 9:17 AM To: CF-Talk Subject: RE: survey trouble What about giving each a letter value = e.g. Strong A = A Agree = B Neutral = C Etc. Then on "landing" page converting the "val" via a "switch" statement into a value and inserting it into the database. <cfquery datasource="" name=""> UPDATE table <cfswitch expression="#form.val#"> <cfcase value="A"> SET Valcolumn_A = Valcolumn_A + 1 </cfcase> <cfcase value="B"> SET Valcolumn_B = Valcolumn_B + 1 </cfcase> <cfcase value="C"> SET Valcolumn_C = Valcolumn_C + 1 </cfcase> Etc. </cfswitch> </cfquery> I think this should work, but it may be worth a try - mainly due to <cfswtich> being a little flaky inside <cfquery> J -----Original Message----- From: Craig Thomas [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 14:04 To: CF-Talk Subject: survey trouble I am having trouble creating a 'simple' survey with answers like the following: 'Strongly Agree' 'Agree' 'Neutral' 'Disagree' 'Strongly Disagree' I cannot conceptualize how to store and make sense of the answers without a huge amount of code. We do not care to record individual answers (but will/can), but want to know how many people agree/disagree with each question. (There are 10 questions.) All the questions have the same possible answers. Any help is greatly appreciated, Craig Thomas www.worldcupbicycles.com ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists