I'm just winging this off the top of my head.
If you are absolutely sure that the order of the checkboxes will NOT
CHANGE, and that is a very risky assumption. And assuming that you have an
array to hold the values for the checked box, why not just store the value
of the index for each question? Or assign some other arbitrary value to
Alternative which does the same thing in less space. Use a drop down list (
combo box ) to display the possible answers for each question and store
some key value for the question.
So much of this is governed by what you want to do with the gathered
Hope this has been of some help - Miles Thompson
At 06:42 PM 5/16/01 -0600, John Starkey wrote:
>Ok This one has me stumped.
>I'm working on a survey for an author. There is already a total of 35
>questions and their corresponding columns in the main table. She has three
>other questions that have identical checkboxes, 30 each. I want to put
>them in the second table and just make reference to the record_id from the
>main table and the question number, so that I don't end up with 90 columns
>in this second table.
>Anyone have any suggestions on a quick way to do this? Obviously the
>checkboxes will need to have unique names, but the columns won't. I'm
>pretty fried on this and ready to take the not so efficient route of
>having 90 columns.
>This is a MySQL/PHP4 job.
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]