Dear Jason,
Thank you so much for your reply, that was really helpful. I see what is happening. the query generated is this:
SELECT RecipeID, Title, Serves, Intro, WhatYouNeed, HereHow, CountAs, CatagoryID FROM Recipies WHERE FoodPlan = 1 AND ((Title LIKE '%milk%')) OR ((WhatYouNeed LIKE '%milk%')) LIMIT 0, 10
what is happening is because of the OR it is not honoring the WHERE FoodPlan = 1 statement which means that it is returning results that are not FoodPlan = 1. I do need the OR as I want the search to look for the keyword in the "Title" as well as "WhatYouNeed" columns. But if I can change it to this:
SELECT RecipeID, Title, Serves, Intro, WhatYouNeed, HereHow, CountAs, CatagoryID FROM Recipies WHERE ((Title LIKE '%milk%')) OR ((WhatYouNeed LIKE '%milk%')) AND FoodPlan = 1 LIMIT 0, 10
were the AND FoodPlan =1 is at the end then the results will be correct. How can I do this?
I am sorry I am not able to upload this for you to see as everything is still being tested locally.
Many thanks again for your help