Jump to content

[SOLVED] Can I really do this with only 2 tables


cooldude832

Recommended Posts

I'm trying to build some survey software (i know how to do the gd part not my issue)

The software would allow multiple surveys to be made of differing number of questions/question types

question types include(comment box (in mysql a blob/text), multiple choice(from 2-10 choices), short text answer (255 or less chracters; varchar)) Can i get away with throwing all my survey questions in the same table?  And then the bigger question is then can I have all the survey results FOR ALL SURVEYS in all in the same table (seperate from the survey questions)  My issue is that I want the user to order the questions in any order they want and it will run into an issue when i have a blob type question as the same number as a varchar one.  Is there a way to do this easily.  I know I can let the number of fields just grow, should I make a varchar and blob for each question number so my fields are

 

ID

SurveyID (linker to survey question table)

Field1varchar

Field1blob

Field2varchar

Field2blob

Field3varchar

Field3blob

Field4varchar

Field4blob

...

 

Thanks for any help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.