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

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

record2
-------
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


Subject
Written By
Posted
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.