TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Multi select (http://www.talkphp.com/general/4691-multi-select.html)

Kay1021 07-06-2009 02:41 AM

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


All times are GMT. The time now is 03:05 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0