[thelist] MYSQL Select from Table(s)

Adrian Fischer adrian at logo-logic.com
Thu Apr 19 23:58:12 CDT 2001


and there in lies the problem I think?  I want no other data.  There wont be
a match in every table. Hoepfully there should only be a match in one table.
I dont know which table, but the will be a match.   I only need the state
that matches an email adrress from one of the tables.  I dont think I can do
it.  I may have to try the" if this do that thing"

Of course I could always restructure everything and have all emails in the
one table and then link the other data tables back to the email table
....and then because there are adresses in the other tables as well perhaps
I should have and address table....and on and on and on....my head hurts
just thinking about that (hey its my first db design give me a break...).  I
think that would be the "correct" thing to do but at the moment I just want
it to work....
----- Original Message -----
From: Anthony Baratta <Anthony at Baratta.com>
To: <thelist at lists.evolt.org>
Sent: Friday, April 20, 2001 2:41 PM
Subject: Re: [thelist] MYSQL Select from Table(s)


> At 09:39 PM 4/19/2001, you wrote:
> >What other data do you want from the other tables??
> >
> >If you want state info from each table, try this:
> >
> >SELECT tblAds.State as Ads_State,
> >tbleDockets.State as Dock_State,
> >tblReward.State as Reward_State
> >FROM
> >tblAds,tbleDockets,tblReward
> >WHERE tblAds.Email ='$email'
> >AND tblAds.State = tbleDockets.State
> >AND tblAds.State = tblReward.State
>
> Note:
>
> This will only return info if all three columns have data to report from
> the join.
>
>
>
> ----
> Anthony Baratta
> President
> Keyboard Jockeys
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list