Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public static function joinCondition($firsTable, $firstColumns, $secondTable, $secondColumns) |
||
18 | { |
||
19 | $firstColumns = (array) $firstColumns; |
||
20 | $secondColumns = (array) $secondColumns; |
||
21 | |||
22 | $parts = []; |
||
23 | foreach ($firstColumns as $k => $col) { |
||
24 | $parts[] = "{$firsTable}.{$col} = {$secondTable}.{$secondColumns[$k]}"; |
||
25 | } |
||
26 | |||
27 | return implode(' AND ', $parts); |
||
28 | } |
||
30 |