You need to re structure it using a table called say Questions with the
following sorts of fields
QID Id number
QTitle Title eg Question1
Q The question text
A The answer text
R The rank or score of the question

That way you add questions simply by adding records to the table.

you might find the tutorials at this site useful
http://www.rd-robotics.com/accesscommunity/tutes/index.html
although it is based on access I found it useful.

> -----Original Message-----
> From: WCBaker [SMTP:[EMAIL PROTECTED]]
> Sent: 27 February 2001 16:25
> To:   MySQL
> Subject:      RDBMS question on coding "expanding series-like fields"
> 
> Hi!
> 
> I have a Test Questions database.   Right now I have a hard-coded limit of
> 200 questions in it; I actually made a table with field names like Quest1,
> Quest2. . . Quest200.  However, I know that I am not using the power of
> MySql in setting it up this way.   This is more an example of my own
> ignorance than of the power of MySql!
> 
> Can someone explain how to set up a table with a fieldname that 'expands'
> (maybe something like Quest[i] where "i" can be incremented as required).
> Is there more than one way of doing this?  Is there a place where I might
> see some sample code?
> 
> I did look up 'enum' and 'set' in the manual but I don't feel confident
> with
> my grasp of the limited explanations given of these.   My feeling is that
> perhaps 'enum' would be a candidate for what I need, as 'set' has a limit
> on
> how big the set can get.    I would like to have the possibility of data
> expansion as needed.
> 
> Any tips whatever would be appreciated!
> 
> Thanks very much!
> 
> Cheers!
> 
> -Warren
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to