[thelist] Unique combination numbering
Hassan Schroeder
hassan at webtuitive.com
Fri May 7 10:20:40 CDT 2004
João Verde wrote:
> Water: [ ] River [ ] Lagoon [ ] Pool [ ] Sea [ ] Other
>
> You can check them all, none, or any combination of the 5.
> To save the result in a single field (using MySQL) using a single
> value (much like those used in CHMOD).
You might consider using the SET field type -- define your column
as Water SET('River','Lagoon','Pool','Sea','Other');
MySQL then treats 1 2 4 8 16
them as the values
Setting the value of this column to 9, say, will give you River and
Sea; so you set your checkbox values accordingly and just add them
up prior to your insert/update statement.
HTH!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list