One Table with recipe name, fat content, calorie content and 4 columns for different meal types that recipe may fall under. I know this is relational and this aint the proper way of doing it.
SELECT recipe_id, recipe_title, recipe_serves, recipe_kcal, recipe_fat, recipe_mealtype_1, recipe_mealtype_2, recipe_mealtype_3, recipe_mealtype_4
FROM slimmer_recipes
WHERE recipe_kcal <= '100'
AND recipe_fat <= '28'
AND recipe_mealtype_1 = 'Drinks'
SELECT recipe_id, recipe_title, recipe_serves, recipe_kcal, recipe_fat, recipe_mealtype_1, recipe_mealtype_2, recipe_mealtype_3, recipe_mealtype_4
FROM slimmer_recipes
WHERE recipe_kcal <= '100'
AND recipe_fat <= '28'
AND recipe_mealtype_1 = 'Drinks'
OR recipe_mealtype_2 = 'Drinks'
This just gets mealtypes from mealtype_1 or recipe_mealtype_2 that = drinks, disregarding the kCal or fat content queries.
What are the issues when using AND & OR in the same where statement, do i have to put stuff into ( )?
regards
oliver
essexboy