List:General Discussion« Previous MessageNext Message »
From:Ian Grant Date:January 6 2005 4:25pm
Subject:Re: Retrieving partial field values
View as plain text  
On Wed, 5 Jan 2005 08:19:07 -0800 (PST)
Kentucky Families <kyfamilies@stripped> wrote:

> This is a huge database so the option of using LIKE to bring up
> everything beginning with the search term will result in too many
> hits. I need a way to isolate these entries and search them on whole
> words.

If you have control over input format then you could store multiple
values as say, ':Stott::Statt::Stutt:' and then search thus:

SELECT * FROM people WHERE surname LIKE '%:statt:%'

which will only match whole words. Better would be regular expressions
capable of matching word boundaries, like perl's \b and \B patterns, but
MySQL doesn't do that AFAIK.
Thread
Retrieving partial field valuesKentucky Families5 Jan
  • Re: Retrieving partial field valuesStephen Moretti5 Jan
    • Re: Retrieving partial field valuesIan Grant5 Jan
      • Re: Retrieving partial field valuesStephen Moretti5 Jan
      • Re: Retrieving partial field valuesKentucky Families5 Jan
        • Re: Retrieving partial field valuesJigal van Hemert6 Jan
          • Re: Retrieving partial field valuesKentucky Families6 Jan
            • Re: Retrieving partial field valuesJigal van Hemert6 Jan
            • Re: Retrieving partial field valuesJigal van Hemert6 Jan
              • Re: Retrieving partial field valuesSGreen6 Jan
            • RE: Retrieving partial field valuesAndy Eastham6 Jan
        • RE: Retrieving partial field valuesSteve Bacher6 Jan
        • Re: Retrieving partial field valuesIan Grant6 Jan
    • Re: Retrieving partial field valuesSGreen5 Jan