This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
SelectJoin
ratajs edited this page Feb 13, 2017
·
2 revisions
This method connects two tables and executes query.
Syntax:
$object->selectJoin(string $table, string $join, mixed $array[, bool $all = true[, int $joinType = 0[, string $order = NULL[, string $orderType = "ASC"[, array $cols = array("*")]]]]])
- Object
- - Object of extension.
- Table
- - Table name.
- Join
- - Connected table
- Array
- - String of SQL condition or array, where key is column name and value is its value. When all respectively one is true, this row is going to return.
- All
- - If it’s
TRUE
, row will be selected only when all conditions are true, else row will be selected when whichever condition is true. - JoinType
- - Behavior, when one row won’t find match. If it’s
0
, (INNER), then this row won’t be selected. If it’s1
(LEFT), then will be selected existing part in first table and missing part will be NULL. If it’s2
(RIGHT), then will be selected existing part in connected table and missing part will be NULL. If it’s3
(FULL), then existing part will be selected and missing part will be NULL. - Order
- - Name of column, which will be order argument. If it’s NULL, order argumant will be time of adding.
- OrderType
- - ASC or DESC, order direction.
- Cols
- - List of columns with values, which will fetch(), fetchArray() or fetchAll() method return. If it’s
array("*")
, these methods will return all columns.