Re: serialize?
| From: | Marek Kilimajer | Date: | Tue, 08 Jul 2003 12:01:17 +0000 |
| Subject: | Re: serialize? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154343@lists.php.net to get a copy of this message | ||
No, use another table, poll_options:
poll_option_id, poll_id, option_text, vote_count
hope the structure is self explanatory.
Sævar Öfjörð wrote:
Hi. I’m 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.