SELECT recipes.name, recipes.description FROM recipes, recipe_ingredients WHERE recipe_ingredients.recipe_id=recipes.id AND MATCH(ingredient) AGAINST ("'.strtolower($_GET['ingredient']).'" IN BOOLEAN MODE) ORDER BY name ASC
*SOLVED* ignoring non-unique results on SELECT statements
2 replies to this topic
Posted 21 August 2006 - 10:16 PM
when i do the following SELECT statement it's possible for the recipe to be returned multiple times if an ingredient applies more than once...such as a search on "garlic" that may return on "garlic", "garlic cloves", "garlic salt" etc. How can i limit the select so it only returns one instance of the recipe even on multiple ingredient matches?
Posted 21 August 2006 - 11:43 PM
awesome! thank you...i didn't even think to look at the GROUP BY function as I was making my way through the function list. Cheers!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users