View Single Post
Old 02-20-2013, 07:14 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,549
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Can't do anything about spelling mistakes. Too bad for the stupid user.

But suppose the search is for "ocean resort"

You might do something like:
Code:
SELECT * FROM table WHERE somefield LIKE '%ocean%' OR somefield LIKE '%resort%'
Whether you use OR or AND between the two LIKEs depends on whether the search must find both (all) words or not.

Since you are showing NONE of your current code, I can't change non-existent code for you.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote