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
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