Hello i will be a web designer one day but until then i need a little help
I have a search query that searches the database for user entered string. See below:
$query = "SELECT * From MyTable WHERE Company_Name LIKE \"%$postrimmedc ompname%\" ORDER BY Company_Name" ;
This works fine. If I enter "estate agents", I get the results. and also if I enter "estate" or I enter "agents" I also get the results.
However, if I enter "estate agents housing", it doesnt display the results.
I thought using the LIKE operator and the % sign would make this work. But it doesnt.
if any out their could point me in the right direction i would be most grateful :)
I have a search query that searches the database for user entered string. See below:
$query = "SELECT * From MyTable WHERE Company_Name LIKE \"%$postrimmedc ompname%\" ORDER BY Company_Name" ;
This works fine. If I enter "estate agents", I get the results. and also if I enter "estate" or I enter "agents" I also get the results.
However, if I enter "estate agents housing", it doesnt display the results.
I thought using the LIKE operator and the % sign would make this work. But it doesnt.
if any out their could point me in the right direction i would be most grateful :)
Comment