If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > DB search query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-23-05, 09:40
djavet djavet is offline
Registered User
 
Join Date: Sep 2005
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 09-23-05, 21:03
marist89 marist89 is offline
Registered User
 
Join Date: Oct 2002
Location: greenwich.ct.us
Posts: 279
sounds like you're looking for fulltext searches.

http://www.mysql.com/fulltext
__________________
Jeff Hunter
http://marist89.*************
Reply With Quote
  #3 (permalink)  
Old 09-26-05, 05:49
djavet djavet is offline
Registered User
 
Join Date: Sep 2005
Posts: 5
Hello

Thx for the reply. I will check this.

Regards, Dominique
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On