Re: Zend extensions license

From: Date: Tue, 08 Jul 2003 11:49:06 +0000
Subject: Re: Zend extensions license
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154341@lists.php.net to get a copy of this message
It depends on the number of options, if you only have a small number of options you could just hold them in a VARCHAR, then rebuild the options array from that Say you had four on/off options, you could store them in a VARCHAR(4) as "yyny" then rebuild the array with a simple for loop or just build a function to get the appropriate value etc. Ryan Gibson ----------- ryan_gibson@jmp-partnerhip.co.uk On 8/7/03 12:28 pm, "Sævar Öfjörð" <ofjord@simnet.is> 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. >

« previous php.general (#154341) next »