Re: select * from table where column 'CONTAINS' more than one value (how?)

From: Date: Wed, 22 Jun 2005 16:46:10 +0000
Subject: Re: select * from table where column 'CONTAINS' more than one value (how?)
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-39747@lists.php.net to get a copy of this message
On Tuesday 21 June 2005 10:35 pm, Dan Fulbright wrote: > > I have no problem creating a table, using a query from my dbase table > > "news": > > > > SELECT * FROM table where column = VALUE. > > > > However, now that most of our articles have more than one column type > > (i.e. instead of just technology, the column can now contain "technology, > > politics, local". > > You need to normalize your tables. Make a table called columntypes, then > another called articlecolumntypes. If you have an article with ID 456, > and it has column types of technology (ID 5), politics (ID 15), and > local (ID 34), you tie the articles table to the columntypes table using > the articlecolumntypes table: Good point, this would be the 'Proper' way to do it. -Micah

« previous php.db (#39747) next »