Click to See Complete Forum and Search --> : Tricky SQL statement


DMP23
04-06-2006, 11:16 AM
hey,
just need some help writing this SELECT statement. i need to create a statement that will pull multiple values from table "blueprints" based on multiple conditionals. heres what ive been working on so far, but im not sure if u can have multiple LIKE conditions... plz advise



$query="SELECT * FROM `blueprints`
WHERE `story_id`,`type_id`,`bedrooms`,`bathrooms` LIKE '$keyword', '$keyword2'",'$keyword3'",'$keyword4'";

NogDog
04-06-2006, 12:16 PM
Perhaps...

$query="SELECT * FROM `blueprints`
WHERE CONCAT(`story_id`, `type_id`, `bedrooms`, `bathrooms`)
IN ('$keyword', $keyword2', '$keyword3', '$keyword4')";

...?