Hi, I have two tables:
mysql> describe eventlog; +-------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | | PRI | NULL | auto_increment | | timestamp | int(10) unsigned | | MUL | 0 | | | description | char(100) | | MUL | | | +-------------+------------------+------+-----+---------+----------------+ mysql> describe crossref; +-------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+----------------+ | word | char(20) | | MUL | | | | id | int(10) unsigned | | MUL | | | +-------------+------------------+------+-----+---------+----------------+ Table 'eventlog' is a table of sentence and a unique 'id'. Table crossref is simply a table of single words and an index 'id'. an entry contains a word and an id where said word can be found on the table 'eventlog'. It is common that a: "SELECT * from crossref where word = 'HELLO';" would have multiple results. My question here is I would like to do a search wherein I would like to know which sentence contains the words 'HELLO' and 'DAY' and 'WORLD'. take note that the sentence SHOULD contain ALL the three words not just one or two. I think this is a 'JOIN' question but I am not familiar how to use JOIN. can you show me the syntax? thanks for your help. Jaime --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php