In the rows where `City`='Dallas', there is no record where the `Products` field contains the word "restaurant" yet.
My query is "SELECT * FROM tablename WHERE `City`='Dallas' AND( `Products` LIKE '%restaurant%') ORDER BY `ZIP` ASC"
It is returning all the rows where `City`='Dallas' even though the `Products` field does not contain the keyword "restaurant".
What's wrong with the query. How should the query be formulated in order to return only records where the `Products` field contains the keyword "restaurant" and return zero results if that keyword is not found in any record where `City`='Dallas'?
Thank you in advance
My query is "SELECT * FROM tablename WHERE `City`='Dallas' AND( `Products` LIKE '%restaurant%') ORDER BY `ZIP` ASC"
It is returning all the rows where `City`='Dallas' even though the `Products` field does not contain the keyword "restaurant".
What's wrong with the query. How should the query be formulated in order to return only records where the `Products` field contains the keyword "restaurant" and return zero results if that keyword is not found in any record where `City`='Dallas'?
Thank you in advance