I have a table in which there are three fields
1. city
2. name
3. country
I am available with auto suggest in single Search field as comma seperated values for above given three fields, Now when I write anything on Text field of search and click search i must get all relevant resault. But my query seems to wrong as
I have writtent the WHERE clause as
SELECT * FROM mytable WHERE city LIKE '%$xyz%' OR name LIKE '%$xyz%' OR country LIKE '%$xyz%'
NOTE: while giving input in the search field I DO NOT SELECT ANY AUTOSUGGESTED VALUE
Please Help me to Rectify my query
You need single quotes in your LIKE clauses: