07-06-2009, 02:41 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: May 2008
Posts: 36
Thanks: 5
|
Multi select
I thought i was all set but now i've been faced with a problem and i'm not sure the best way to solve it.
I have a table in my db with the columns
cat_name and school
In the admin section when you were assigning a school to a category i was using a drop down select having the option of all or choosing one particular school from a list.
and when i wanted to show things depending on the school the user chose it would be WHERE school ='All' OR school=$school
But now i need to modify it so that when you are assigning a school to a category that instead of a select list i need to have a multi select list....so you could choose all or any combination of schools
I've never really used a multi select but i know it puts it into an array
The question is what is the best way to put those into my database, and then be able to them in a statement like WHERE school ='All' OR school=$school
thanks
|
|
|
|