1 message in com.mysql.lists.win32Re:RE: Multiple
FromSent OnAttachments
Sam DeForest21 Mar 2004 14:28 
Subject:Re:RE: Multiple
From:Sam DeForest (sam.@thedeforestfamily.net)
Date:03/21/2004 02:28:44 PM
List:com.mysql.lists.win32

Eric, That's exactly what the problem was! Thanks for the info.

cheers, sam

-----Original Message----- Sent: Sunday 3/21/2004 5:11:44 PM Subject: RE: Multiple "AND" statements in 1 query

Syntax looks good to me - if you are getting 0 rows back and not a syntax error, I would look at case - eg: is the Last name stored as 'Jones' or 'JONES' - since you are using '=' it would not bring back data unless it is an exact match.

-----Original Message----- From: Sam DeForest [mailto:sam.@thedeforestfamily.net] Sent: Sunday, March 21, 2004 5:04 PM To: win@lists.mysql.com Subject: Multiple "AND" statements in 1 query

I am trying to create a statement that has multiple conditions, and I am not very successful at this. I am using one WHERE condition and need to put in multiple AND conditions. How is this supposed to read?

SELECT First, Last, Address1, Address2, City, State, Zip, Area_Code, Tel FROM Contacts WHERE Zip = 'xxxxx' AND Area_Code = 'xxx' AND Last = 'jones' ORDER BY Zip ASC

I know data exists, however none shows up. Does anyone have an idea?

Thanks in advance, Sam