468,544 Members | 1,814 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Sending Multiselect List information to MySql

Greetings all,

I've got a form that posts to a mysql server via php that has a multi select list. I want to know if it is possible to put multiple responses into one column of the database with the one list.

for example, here's the html code in the form for the list:
Expand|Select|Wrap|Line Numbers
  1. <select name="input3" size="5" multiple="MULTIPLE">
  2.     <option>LBS</option>
  3.     <option>SDS</option>
  4.     <option>MWC</option>
  5.     <option>KCF</option>
  6.     <option>THP</option>
  7.   </select>
  8.  
I'd like to be able to send multiple of these selections to the database at the same time and store them in one column.

Thanks for your help,

-Martin
Jan 9 '12 #1
3 1759
Rabbit
12,513 Expert Mod 8TB
Storing them in one row is a bad idea. It would denormalize your data and make it harder to query later on.
Jan 9 '12 #2
thanks Rabbit. So if i dont want to do that, is it possible to store each one of those options in its on column of the database?
Jan 9 '12 #3
Rabbit
12,513 Expert Mod 8TB
You don't really want to do that either. Storing them in one row in their own column is only a little better than storing them all in the same column. They really should be stored in its own row. One record for each choice.
Jan 9 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Shannan Casteel via AccessMonster.com | last post: by
2 posts views Thread by Steph | last post: by
2 posts views Thread by circuit_breaker | last post: by
3 posts views Thread by John | last post: by
5 posts views Thread by doncee | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.