MySQL Forums
Forum List  »  Full-Text Search

Multiple columns question
Posted by: Doug Dalton
Date: September 13, 2005 10:54AM

How do I do the query :

Select * FROM database WHERE FirstName LIKE '%$FirstName%' AND LastName LIKE '%$LastName%' AND Job LIKE '%$Job%'

If I do
Select * FROM database WHERE MATCH (FirstName,LastName,Job) AGAINST ('$FirstName $LastName $Job')

This matches all the fields against all the search options not matching specific fields to specific columns, but my understand ins that you cannot do

Select * FROM database WHERE MATCH (FirstName) AGAINST ('$FirstName') AND MATCH (LastName) AGAINST ('$LastName') AND MATCH (Job) AGAINST ('$Job')

so how can I do this last search with the Fulltext option?

Options: ReplyQuote


Subject
Views
Written By
Posted
Multiple columns question
8817
September 13, 2005 10:54AM
3742
September 13, 2005 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.