How about creating a table with these fields: answerID answer (contains the texts you specified)
Make sure the IDs represent the answer's position in the scale (Strongly Agree = 5, Strongly Disagree = 1). Then have a linking table between the users, answers and questions: userID questionID answerID (I guess the Primary Key will be a combination of all three fields.) To get people who agree with a question: SELECT u.username FROM users u, userAnswers ua WHERE u.userID = ua.userID AND ua.questionID = #questionID# AND ua.answerID > 3 etc.! If your answers are fixed, maybe the answers table wouldn't be necessary. Just have a 'answer' field in userAnswers, set between 1 and 5 according to the answer. HTH - Gyrus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- Original Message ----- From: "Craig Thomas" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, April 15, 2002 2:03 PM 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 ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm 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