src/DataTable.php
public function setJoin($table, $on, $join = 'LEFT JOIN', $duplicate = false)
    {
        $this->join[] = $join.' '.$table.' ON '.Helper::formatOn($on);
        if ($duplicate !== false) {
            $this->patchDuplicateRow['pKey'] = $duplicate[0];
            if (is_array($duplicate[1])) {
                $this->patchDuplicateRow['columns'] = isset($this->patchDuplicateRow['columns']) ? array_merge($this->patchDuplicateRow['columns'], $duplicate[1]) : $duplicate[1];
            } else {
                $this->patchDuplicateRow['columns'][] = $duplicate[1];
            }
        }

        return $this;
    }
public function setJoin($table, $on, $join = 'LEFT JOIN', $duplicate = false)
    {
        $this->join[] = $join.' '.$table.' ON '.Helper::formatOn($on);
        if ($duplicate !== false) {
            $this->patchDuplicateRow['pKey'] = $duplicate[0];
            if (is_array($duplicate[1])) {
                $this->patchDuplicateRow['columns'] = isset($this->patchDuplicateRow['columns']) ? array_merge($this->patchDuplicateRow['columns'], $duplicate[1]) : $duplicate[1];
            } else {
                $this->patchDuplicateRow['columns'][] = $duplicate[1];
            }
        }

        return $this;
    }
public function setJoin ( $ table , $ on , $ join = 'LEFT JOIN' , $ duplicate = false ) { $ this -> join [ ] = $ join . ' ' . $ table . ' ON ' . Helper :: formatOn ( $ on ) ; if ( $ duplicate !== false ) { $ this -> patchDuplicateRow [ 'pKey' ] = $ duplicate [ 0 ] ; if ( is_array ( $ duplicate [ 1 ] ) ) { $ this -> patchDuplicateRow [ 'columns' ] = isset ( $ this -> patchDuplicateRow [ 'columns' ] ) ? array_merge ( $ this -> patchDuplicateRow [ 'columns' ] , $ duplicate [ 1 ] ) : $ duplicate [ 1 ] ; } else { $ this -> patchDuplicateRow [ 'columns' ] [ ] = $ duplicate [ 1 ] ; } } return $ this ; }
Join data from other tables

@param string $table     .
@param array  $on        Must contains two elements like key:sql_table => value:sql_column
@param string $join      .
@param array  $duplicate 0    Contain a column id... Generally the same that on ON
1     Contain column or columns

@return self
Join data from other tables