dragon2309
P.I Dragon
hi all, perhaps just apj again, open to all. ok, so i have a normal SELECT statement. in the WHERE clause is it possible to put to different entities. For example, one record has two different "colours" assigned to it, for the example these colours are RED and BLUE. Is it possible in the WHERE clause to specify two different fields (colour 1 and colour 2) but with an "OR" , so say the user searches for RED, the query statement would see it as EITHER colour 1 OR colour2 == RED. The sme for blue, i would want it to search both colour 1 and coour 2 to see if either of them match the users search criteria.
Can this be done, apj101, you kinda know my db schema inside out already, and i know its not normal, so can it be done....
Im thinking the SELECT statement would look a little like this
"SELECT * FROM '$cat' WHERE 'colour1' OR 'colour2' = '$colour'"
If the above is achievable, can it be expanded to cover 3, 4, 5, 6 differnt colours or other attributes...
thanks, dragon
Can this be done, apj101, you kinda know my db schema inside out already, and i know its not normal, so can it be done....
Im thinking the SELECT statement would look a little like this
"SELECT * FROM '$cat' WHERE 'colour1' OR 'colour2' = '$colour'"
If the above is achievable, can it be expanded to cover 3, 4, 5, 6 differnt colours or other attributes...
thanks, dragon

Last edited: