Hi,

> Table1: product         Table2: measures
> 1) ID                   1) ID
> 2) weight               2) symbol
> 3) ID_weight_measure
> 4) height
> 5) ID_height_measure

> OK. Is there a way to obtain with a single select
> statement both (or any...this is only an example) the
> joins ID_weight_measure with the related symbol, and
> the ID_height_measure with its symbol?
> I don't know if it's a many-to-many relationship, and
> even if it is, I don't know how to implement it.
> I hope in your help.

select p.id_weight_measure, m1.symbol,
       p.id_height_measure, m2.symbol
from product p, measures m1, measures m2
where p.id_weight_measure = m1.id and
      p.id_height_measure = m2.id


Regards,
Sasa



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to