List:General Discussion« Previous MessageNext Message »
From:Taiyo Date:February 27 2006 6:40pm
Subject:RE: Connecting to queries into one
View as plain text  
select from consumers LEFT JOIN cases ON = WHERE consumers.date_of_birth = '?' AND cases.last_name = '?' AND
cases.full_first_name = '?'

-----Original Message-----
From: Courtney Braafhart [mailto:courtney.braafhart@stripped] 
Sent: Monday, February 27, 2006 1:31 PM
To: mysql@stripped
Subject: Connecting to queries into one

		To collect any WHERE date of birth, last name
first name matches  what was entered by the user.  The trick is that  
date of birth lives in 		the consumer table and last name and first  
name lives in the cases table (which can be joined to consumers by and cases.consumer_id).

		Can anyone think of way to do this in one mysql statement
of doing a loop?

		I am thinking it would work something like this:

		SELECT FROM consumers WHERE date_of_birth = ?
AND = (SELECT consumer_id FROM cases WHERE last_name = ?

AND full_first_name = ? )

		Is there a way to form the above statement in MYSQL?


		That there is a really obvious solution to this question and
that I  
am simply suffering from a case of the Mondays!

Thanks in advance!

Courtney Braafhart

MySQL General Mailing List
For list archives:
To unsubscribe:

Connecting to queries into oneCourtney Braafhart27 Feb
  • RE: Connecting to queries into oneTaiyo27 Feb
  • Re: Connecting to queries into onePeter Brawley27 Feb
RE: Connecting to queries into oneJohn McCaskey27 Feb