Builds a Join Query, by adding another dataobject to this one. Be careful when using this, raw queries may be clearer than using joinAdd.
Thanks to Stijn de Reede for the implementation of this.
object $obj - joining object (no value resets the join)
string $joinType - "LEFT" | "INNER " | "RIGHT" | ""
INNER is default, "" indicates just select ... from a,b,c with no join and links are added as where items.
Note: 'LEFT' is the same as LEFT OUTER.
string $joinAs - if you want to select the table as anther name useful when you want to select multiple columns from a secondary table.
string $joinCol - The column on This objects table to match,needed if this table links to the child object in multiple places eg.
Пример 34-1. using specific join Columns
|
üÔÁ ÆÕÎËÃÉÑ ÎÅ ÄÏÌÖÎÁ ×ÙÚÙ×ÁÔØÓÑ ÓÔÁÔÉÞÅÓËÉ.
The Examples below are not tested, use DB_DataObject::debugLevel(1), to see what exactly is going on when you use this, and send the author some better examples..
Пример 34-2. Simple simple Join
|
Пример 34-3. Resulting SQL
|
Пример 34-4. More Complex Join query
|
Пример 34-5. Resulting SQL
|
Пред. | Начало | След. |
->selectAs() | Уровень выше | ->set*() and ->get*() |
HIVE: All information for read only. Please respect copyright! |