Re: query challanged newbie

2003-07-22 Thread Sam Tregar
On Wed, 23 Jul 2003, Sam Tregar wrote: > SELECT a2.name > FROM alpha AS a1, bravo AS b, alpha AS a2 > WHERE a1.name = 'fred' AND > a1.id = b.afrom AND > b.ato = b.id; Whoops, that last line should read: b.ato = a2.id; -sam -- MySQL General Mailing List

Re: query challanged newbie

2003-07-22 Thread Sam Tregar
On Tue, 22 Jul 2003, Larry Brown wrote: > Table alpha: > > id int(3) not null auto_increment, > name char(12) not null, > Table bravo: > > afrom int(3) not null, > ato int(3) not null, > in the php variable coming in I have fred and need to run a query to get > george. You just need to join f

query challanged newbie

2003-07-22 Thread Larry Brown
I am having some weird problem figuring this seemingly simple query out. Here are the two tables from which I have to run the query Table alpha: id int(3) not null auto_increment, name char(12) not null, primary key(id) example data 1 fred 2 bob 3 sam 4 rita 5 george 6 laura 7 nancy Table brav