dynamic questionairres

Results 1 to 2 of 2

Thread: dynamic questionairres

  1. #1
    Join Date
    Dec 1969

    Default dynamic questionairres

    Hi List,<BR><BR>I need some help getting my head around a problem.<BR><BR>page1.asp is a list of questions pulled from a database (pk is <BR>question_id) with a yes &#124 no radio button on the size. I can get this to <BR>display correctly.<BR><BR>page2.asp should gather all the answers and add them to an access <BR>database, here is where I&#039;m stuck. I&#039;m thinking the best way to store <BR>them is in a memo field using an array rather than a colomn for each <BR>yes/no value as the number of answers will change each time. Simple <BR>enough to insert the array. I would just like some advice on displaying <BR>all this information. So when I go in an click the questionairres ID I <BR>want to see a list of answered Questions and their relevant answers. I can split <BR>the array to be 1(id)-Yes(answer) 2-No 3-Yes but i dont know how to link <BR>these with the questions table without a select for each question.<BR><BR>Any help with this would be greatful.<BR>Thanks for reading this<BR>Renee :)

  2. #2
    Join Date
    Dec 1969

    Default don't do it!

    NORMALIZE! Normalize your db!<BR><BR>You want ONE RECORD PER ANSWER!<BR><BR>Table: Answers<BR>qid : foreign key to questions table<BR>ans : number or boolean<BR><BR>If you need to keep the info sorted by person, then you&#039;ve got two options:<BR><BR>Table: Answers<BR>qid : foreign key to questions table<BR>uid : foreign key to users table<BR>ans : whatever<BR><BR>*OR*<BR><BR>Table: WhoAnswered<BR>wid : primary key, probably autonumber<BR>uid : foreign key to users table<BR>qid : foreign key to questions table<BR><BR>Table: Answers<BR>wid : foreign key to WhoAnswered table<BR>ans : whatever<BR><BR><BR>*******************<BR><BR>Yea h, I know, it sounds like a *ton* of records. But in the long run you will be a *lot* happier!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts