Because it is desirable to create many small tables over one very large table I usually allow PHP to create dynamic tables. For instance, you could have a table called polls, and use the row id to create a unique table:
<?php $query = "CREATE TABLE poll_number_{$poll_id]} ( " . /*insert values here*/ '' . ")"; // note: i don't have time to write out a full example...this is // pseudocode, and definitely /not/ cut and pastable ?> -Dan On Tue, 2003-07-08 at 07:28, Sævar Öfjörð wrote: > Hi. Im coding a poll system which stores information in MySQL. > > When a new poll is created a new row is inserted in the table polls. > There I keep basic information such as the question, id etc. But should > I keep the poll options in one field also? Then I would create an array > from the poll options the user specifies, serialize it and then > base64_encode it. > > Is this a good way of storing an array or should I make a database table > named for example: polls_options? > > Any opinions and thougts on this appreciated. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php