From: Peter Brawley
Date: July 26 2006 4:24pm
Subject: Re: Checkboxes
List-Archive: http://lists.mysql.com/mysql/200315
Message-Id: <44C79754.8010806@earthlink.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Nicholas Vettese wrote:
> I am trying to allow a user to use checkboxes for multiple selections, and I am trying to get the database to record the choices made by the user. I am using a VARCHAR(250), but I am guessing that may be wrong. Also, other than adding a "[]" to the end of the 'name' (e.g. Alternative ), what do I need to do?
>
If you have N = a large number of checkboxes, if the list will
definitely not change, and if they are not likely to require frequent
individual edits, saving them as a string of N 0|1|? values can be quite
efficient for saving retrieving them. We've written test scoring
software based on that. But if frequent item edits are possible, you are
further ahead saving each as a named TINYINT.
P.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 7/25/2006