Results 1 to 3 of 3

Thread: DB search query

  1. #1
    Join Date
    Sep 2005
    Posts
    5

    Unanswered: DB search query

    Hello

    I've a query for searching a contact name:
    Code:
    SELECT *
    FROM contacts, pays
    WHERE 
    (
    nom like '%SearchString%' or  
    web_url like '%SearchString%' or  
    organisation like '%SearchString%' or 
    pays like '%SearchString%'
    ) 
    AND 
    contacts.code_pays_rel=pays.code_pays
    ORDER BY organisation, nom ASC
    My contact name: Bokhandel Peter Eggertz

    Per exemple:
    I give as keyword "ter egg", I found the name, but if I give "egg ter", it doesnt work or if "bokhan eggertz" it doewsn't work too.

    How can I make this to find the contact?

    A lot of thx for yoru help and time.
    Regards, Dominique

  2. #2
    Join Date
    Oct 2002
    Location
    greenwich.ct.us
    Posts
    279
    sounds like you're looking for fulltext searches.

    http://www.mysql.com/fulltext

  3. #3
    Join Date
    Sep 2005
    Posts
    5
    Hello

    Thx for the reply. I will check this.

    Regards, Dominique

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •