Scott
O.K. dumb question. A bigger string can't be contained in a smaller one.
But how can I make it so someone searching "dogs" can pull up an item that
contains dog?
My first instinct was to tell you to use perl and a dictionary of common
terms.
But I remembered there is the LIKE function
HI CRAIG,
i'ts possible to use this query with multiple search terms?
query: select * from TABLENAME where
if(right(SEARCHFIELD,1)='s',left(SEARCHFIELD,lenth(SEARCHFIELD)-1),SEARCHFIE
LD)
like '%SEARCHTEXT%'
i.e: one user search for: passaros jogos campos [in portugueze]
the app is written
In MySQL it says that adding the following to a where clause:
like %$somestring%;
should select matches that contain $somestring in them anywhere.
However when I use it I find that if e.g. I have an entry dog in the
database, if I search for dogs, it doesn't come up. Also if I search for
You are searching for the word dogs...that word is not contained in
the word 'dog' or the phrase 'dog house.'
If you searched for '%dog%' you would get both of those results.
The wildcard character allows any other character in it's place...hence
'%dog%' finds 'mydog', 'mydogs', etc, etc...it
O.K. dumb question. A bigger string can't be contained in a smaller one.
But how can I make it so someone searching dogs can pull up an item that
contains dog?
Thanks,
SW
On Wednesday 10 April 2002 17:58, you wrote:
In MySQL it says that adding the following to a where clause:
like
I don't believe you could do that with a single SQL statement. The best
way would be to build intelligence into an application that would look at
the search term, determine if it is a plural by looking up it some sort of
dictionary, and then use the singular in the form %singularsearchterm%.