Posted by Jerry Stuckle on 06/25/06 03:11
Geoff Berrow wrote:
> Message-ID: <upSdnV7otMxIdQDZUSdV9g@ptd.net> from IchBin contained the
> following:
>
>
>> [X] classic = 1
>> [X] rock = 2
>> [_] ballad = 4
>> [_] 80's = 8
>> [X] 90's = 13
>>
>>Example, above the bucket value would be 16
>>
>>if you had 6 the you know it is 'rock' and 'ballad'
>>if you had 10 the you know it is 'rock' and '80's'
>>... and so on.....
>
>
> Wow that's neat. But as we have explode and implode wouldn't it be
> simpler to just store the genres as a comma separated list?
>
Yes, that was done in the old days because memory was at a premium. Bit it also
caused problems - like the Y2K bug.
Nowadays, it's better to have a many-to-many table to connect the artist to the
genre. Then it's a simple matter to fetch all the genre's for an artist and
store them in a PHP array. Check the option to see if it's stored in the array;
if it is you can check the box before displaying it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|