Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clever storage?

Status
Not open for further replies.

Icoolerthnu

Programmer
Joined
Feb 21, 2003
Messages
1
Location
US
im creating the database to store information from several forms for a class. One form contains about 30 checkboxes which give yes or no information. anyone got a clever way to store this besides like 30 bool collums in a table... (i dont know why that just seems...crude =D)
 
considering booleans can be implemented as a single bit, it's very not crude actually... about as efficient as you can get. I'm not positive mySQL does booleans like this, if not there's a good chance it has a bit field you can use that.

-Rob
 
Depending on your language, you should be able to serialize the data (in an array for example) and then later retrieve the data and unserialize it. I use this in a number of situations. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top