Re: Multiple values for a column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 20 February 2004 09:14, Shiloh Madsen wrote:
> I need to figure a way to create a table column that will allow for me to
> be able to say "IF column =" and then specify more than a single value. for
> instance, select all from the table where the column in question is either
> 1, 3, 4, and/or 7. 

If you're using MySQL have a look at the IN operator.

> However, I want this column to be able to hold more than
> just a single value. for instance its value would be 1, 4 or something
> similar like that.

If you're using MySQL have a look at the column types SET and ENUM. However in 
general is it better not to store multiple values in a single column, they 
should be moved into a separate table.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
	Fred noticed his roommate had a black eye upon returning from a dance.
"What happened?"
	"I was struck by the beauty of the place."
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux