TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-06-2009, 02:41 AM   #1 (permalink)
The Contributor
 
Join Date: May 2008
Posts: 36
Thanks: 5
Kay1021 is on a distinguished road
Default 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
Kay1021 is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating objects from a MySQL select statement captainmerton Absolute Beginners 10 05-19-2009 04:50 PM
[SQLITE2] Complicated SELECT with 2 sub-queries RobertK MySQL & Databases 3 09-24-2008 04:42 PM
SELECT statement -- list of fields in WHERE clause Dave MySQL & Databases 7 09-17-2008 11:36 AM
Blogs...? Aaron Absolute Beginners 8 03-04-2008 02:09 PM
MySQL - Is there a better way to SELECT Acrylic Absolute Beginners 3 10-24-2007 03:39 PM


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

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design