MySQL Forums
Forum List  »  MySQL Query Browser

Pure SQL query question
Posted by: Erik Markies
Date: October 18, 2011 09:55AM

TABLE example

fields: name, description, address

name: Judo Center The Judokas
description: Dojo in the heart of the City of Paris. Also for Kids
address: Blossom Avenue 333, Paris

name: The Aikis
description: Aikido gym in brussels, Belgium. Amateur & Professional.
address: Mainstreet 44, Brussels

User searches for "Judo Center Paris", or "Aikido Brussels"
(let`s call the search "searchstring")

So far, i have come up with:
SELECT * FROM example WHERE name LIKE '%searchstring%' OR description LIKE '%searchstring%' OR address LIKE '%searchstring%'";

Obviously, this doesn`t return any of the records. Which SQL query should i use?

Options: ReplyQuote

Written By
Pure SQL query question
October 18, 2011 09:55AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.