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 perl...forum system.. tanks, Lucas >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%. It >gets complicated because this varies from language to language. While, I >don't like it, here is a 'quick and dirty' sql statement that will look at >the term, if it ends in s, it then drops the s. But don't forget about >words like DOS, was, houses, Ross, etc. These would all cause problems >using this simplified method (not to mention terms in other languages). >select * from TABLENAME where >if(right(SEARCHFIELD,1)='s',left(SEARCHFIELD,lenth(SEARCHFIELD)-1),SEARCHFI ELD) >like '%SEARCHTEXT%' >Hope this sheds some light on it! >Craig Ostrander --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php