Entry
How would I create the syntax for this query? select foobar like '%brown, charley%', If you actually search "charley brown"? When the db is reversed?
Feb 11th, 2008 01:01
dman, Adam Cripps, Christian Mack, Tõnu Samuel, Patrick Hanf, http://sturly.com
Do you want to get answer even if order of names is reversed? In this
case correct clause is
SELECT * FROM table WHERE foobar LIKE '%brown%'AND foobar LIKE
'%charley%'
_________________________________________________________________________
You would also want to store charley and brown in two different fields -
for example
first_name and second_name- then search across the two - returning any
records
which match either -this method allows the user to enter either in
either field and you
will still get a return.
HTH
Adam
_________________________________________________________________________