List:General Discussion« Previous MessageNext Message »
From:Jim Faucette Date:October 17 1999 6:21pm
Subject:Re: text search with mysql
View as plain text  
Andreas Gietl wrote:
> 
> hi i'am having a little problem making mysql search for a string that
> does not completly match the searched field, but does just CONTAIN the
> search string.
> Is it possible to realize this withing Mysql or do i have to do this
> within my programm?
> 

Use the LIKE operator and % as wildcards:
 ... WHERE somefield LIKE '%jim%';
Unfortunately this won't use any index on 'somefield'. If you know that
'jim' starts the field then you can still use indexing with:
 ... WHERE somefield LIKE 'jim%';

  jim...
Thread
text search with mysqlAndreas Gietl17 Oct
  • Re: text search with mysqlAndrian17 Oct
  • Re: text search with mysqlBob Kline17 Oct
  • Re: text search with mysqlTkil17 Oct
  • Re: text search with mysqlJim Faucette18 Oct
  • Re: text search with mysqlx x xu19 Oct