System:Model:leftJoin
From Aspen Documentation
Generates a left join.
Since 1.0
Arguments
void leftJoin (string $table, string $key, string $foreign_key, [array $fields = false], [ $from_table = false])
- table
- Database table name of table to join.
- key
- Field on which to perform join inside new table.
- foreign_key
- Field on which to perform join inside original table.
- fields
- An array of fields from the new table to return in select statement.
- from_table
- Name of original table. If false, table used in original select used.
Examples
Example:
$this->APP->model->select('blog'); $this->APP->model->leftJoin('authors', 'id', 'author_id', array('name'));