WHERE AND LIKE

movieprodw
movieprodw used Ask the Experts™
on
Hello,

I am having an issue with this query.

I would like for it to search for target_customers and the other like fields but it does not return the correct target_customers.

WHERE target_customers = '3' AND title LIKE '%hats%' OR ad_tags LIKE '%hats%' OR description LIKE '%hats%
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011
Commented:
Try this:

WHERE target_customers = '3' AND (title LIKE '%hats%' OR ad_tags LIKE '%hats%' OR description LIKE '%hats%)

Author

Commented:
I did not know you could do that, thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial