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 > search query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-08, 14:39
morguefile morguefile is offline
Registered User
 
Join Date: Mar 2008
Posts: 11
search query

I am trying to build a search engine and I've run into a little problem with exclude from results- can anyone see what is wrong with this statement....

Code:
SELECT archive_search_wordmatch.unique_id 
FROM archive_search_wordmatch 
INNER JOIN archive_search_wordlist 
ON (archive_search_wordmatch.word_id = archive_search_wordlist.word_id) 
WHERE archive_search_wordlist.word_text IN ('fruit') 
AND NOT EXISTS ( SELECT archive_search_wordlist.word_id FROM archive_search_wordlist WHERE archive_search_wordlist.word_text IN ('apple','pear','orange') ) 
GROUP BY archive_search_wordmatch.unique_id LIMIT 0, 5000
Reply With Quote
  #2 (permalink)  
Old 04-11-08, 15:02
morguefile morguefile is offline
Registered User
 
Join Date: Mar 2008
Posts: 11
nevermind I found it....

http://www.pui.ch/phred/archives/200...e-schemas.html


This is from 2005, I guess it still aplies
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