Hi, Try with FULLTEXT search. Alter the table to make the search columns as FULLTEXT columns, with MyISAM engine and retrieve the records using MATCH keyword.
Ref:http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html Thanks, ViSolve DB Team. ----- Original Message ----- From: "Ed Curtis" <[EMAIL PROTECTED]> To: <mysql@lists.mysql.com> Sent: Monday, September 25, 2006 11:47 PM Subject: Help with query > > I'm trying to do a keyword search within a phrase saved in a table. > > Here's the query: > > SELECT * from closedtickets WHERE > > keyphrase LIKE '%$keyword1%' > > OR keyphrase LIKE '%$keyword2%' > > OR keyphrase LIKE '%$keyword3%' > > The problem I'm having is that the query is returning every record in the > table. I only want it to return the records where the keywords (any > combination) are contained within 'keyphrase' Any ideas? > > Thanks, > > Ed > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >