Reply to Re: mysql update and checkboxes

Your name:

Reply:


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
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация