Forum Moderators: open
Table questions:
Id: Int not null primary key auto_increment
Questions: (List of questions here)
Date: Date
Category: Varchar(50)
Etc. Etc.
Thanks!
[edited by: CWebguy at 7:20 pm (utc) on Jan. 18, 2008]
So instead of having a single Table (say, tPoll) with columns such as:
PollID INT NOT NULL Primary Key Auto-Increment
Questions VARCHAR(?) NOT NULL
PollDate DATETIME
etc...
typically, you would have two tables (say, tPoll and tPollQuestion) with columns such as:
TABLE: tPoll:
PollID INT NOT NULL Primary Key Auto-Increment
PollDate DATE
etc... (other poll related attributes)
and
TABLE: tPollQuestion:
PollID (not sure of syntax in mysql to say foreign key back to tPoll.PollID)
QuestionID INT NOT NULL Auto-Increment
QuestionText VARCHAR(128)
QuestionOrder INT NOT NULL
etc... (other question related attributes)
[edited by: ZydoSEO at 8:01 pm (utc) on Jan. 18, 2008]
I know about the enum type, but if I'm not mistaken, doesn't that only let you insert one value into each field (which is limited to one of a number of predetermined values)?
Thanks!