I think you need to be using: select * from clients_tb where active='on' AND first_name LIKE '%ja%' OR middle_name LIKE '%ja%' OR last_name LIKE '%ja%'";
Your query is looking for names where the first, middle and last name all have 'ja' in them. If you're looking for names where -any- of them can have 'ja' in them, use the OR. Jennifer Horne Panda Voice Systems Inc. 1.888.767.2632 ext 23 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 9:41 AM To: [EMAIL PROTECTED] Subject: (simple select) bug? version problem? or just bad SQL? Hi, I am running this (simple?) query on mysql 3.23 : select * from clients_tb where active='on' AND first_name LIKE '%ja%' AND middle_name LIKE '%ja%' AND last_name LIKE '%ja%'"; I know there are people in the table with: first name James last name James middle name Jacob etc but it does not display them...if i try with just first name then it displays the people whose first names start with "ja" whats wrong? is this a bug or not supported in 3.23 or I have written bad SQL? How can I do the above? Thanks, -Ryan A -- 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]