Have you dumped out your variables to make sure none of them is a
zero-length string? That would surely cause your problem.


Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

-----Original Message-----
From: Ed Curtis [mailto:[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 2:18 PM
To: mysql@lists.mysql.com
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]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to