At the moment I am using a query like this:
$query = "SELECT * FROM buynowmodel
WHERE modelname LIKE '%".$search."%' || make LIKE '%".$search."%' ORDER BY make";
If the search variable is something like Audi then all Audis are found fine. If the search term is A4 then all Audi A4s are found fine. Problem is if a user types in Audi A4 as a search term then nothing is found because neither the make or the model is like Audi A4.
Is there a way for MySql to take the two separate words as search terms or just take the second word (as the make isn’t actually needed).
Thanks very much.