DB_DataObject: Nested joins possible with joinAdd()?
| From: | Andy Crain | Date: | Thu, 07 Aug 2003 22:04:12 +0000 |
| Subject: | DB_DataObject: Nested joins possible with joinAdd()? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7093@lists.php.net to get a copy of this message | ||
It seems to me that it's not possible to construct nested or chained
joins with joinAdd(). That is, something like:
select stuff
from table_a
left join table_b on table_a.b_id = table_b.b_id
left join table_c on table_b.c_id = table_c.c_id
I can't come up with a way to do this using joinAdd(), since it seems
one of the joined tables always must be the current object, and in this
example, neither of the tables in the second join is the current
table/object calling joinAdd(), in this case DataObjects_Table_a. Will I
have to use query() for this? Just wanted to check with those more
knowledgeable than me before giving up.
Thanks in advance,
Andy