[thelist] [mysql] join

Joshua Olson joshua at waetech.com
Fri Jan 23 12:46:23 CST 2004


----- Original Message ----- 
From: "kris burford" <kris at midtempo.net>
Sent: Friday, January 23, 2004 1:39 PM


> *or in other terms, with colour and size as the two id references, plus
> quantity as the "other stuff":
> row1 green 5
> row2 orange 10
> row3 large 5
> row4 small 10
>
> whereas what i was hoping for was
> row1 : a.id_one.name, a.id_two.name, a.id.some_other_stuff
> row2 : b.id_one.name, b.id_two.name, b.id.some_other_stuff

> any ideas??

Kris,

Yes.  Run with this idea and see where you end up.

You can inner join against the same table multiple times.  Use a table alias
to differentiate between them.

Hint: INNER JOIN table_one with table_two twice.

Best of luck,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list