soo_txp_obj API Documentation
soo_txp_left_join Class Reference
Class for SELECT ... More...
Public Member Functions | |
__construct ($table, $left_join, $col1, $col2) | |
Constructor. | |
select ($list= '*') | |
Add items to the SELECT array from the left table. | |
select_join ($list= '*') | |
Add items to the SELECT array from the join table. | |
where ($column, $value, $operator= '=', $join= '') | |
Add expression to WHERE clause, referring to the left table. | |
where_join ($column, $value, $operator= '=', $join= '') | |
Add expression to WHERE clause, referring to the join table. | |
where_join_null ($column) | |
Add an IS NULL expression, for selecting only items not in the join table. | |
order_by ($cols, $direction= '') | |
Add a column to the ORDER BY array. | |
row () | |
Override parent function; return a single record. | |
rows () | |
Override parent function; return all records. | |
sql () | |
Assemble query. | |
count () | |
Return result of a SELECT COUNT(*) query . | |
Static Public Member Functions | |
static | quote ($identifier, $prefix= '') |
Like parent::quote, optionally prepending table name/alias. | |
Public Attributes | |
const | t1 = 't1' |
Left table alias. | |
const | t2 = 't2' |
Join table alias. | |
Protected Attributes | |
$left_join | |
Join table name. | |
$join_on | |
ON expression for join. |
Detailed Description
Class for SELECT ...
LEFT JOIN queries. Currently very incomplete; needs to override most parent methods to specify which table each expression refers to.
Definition at line 422 of file soo_txp_obj.php.
Constructor & Destructor Documentation
soo_txp_left_join::__construct | ( | $ | table, | |
$ | left_join, | |||
$ | col1, | |||
$ | col2 | |||
) |
Constructor.
- Parameters:
-
table Left table left_join Join table col1 Key column name for left table col2 Key column name for join table
Definition at line 439 of file soo_txp_obj.php.
Member Function Documentation
soo_txp_left_join::order_by | ( | $ | cols, | |
$ | direction = '' | |||
) |
Add a column to the ORDER BY array.
- Parameters:
-
col Column name from left table direction ASC or DESC
Reimplemented from soo_txp_query.
Definition at line 514 of file soo_txp_obj.php.
static soo_txp_left_join::quote | ( | $ | identifier, | |
$ | prefix = '' | |||
) | [static] |
Like parent::quote, optionally prepending table name/alias.
- Parameters:
-
identifier Column name or alias prefix Table name or alias
Definition at line 450 of file soo_txp_obj.php.
soo_txp_left_join::row | ( | ) |
Override parent function; return a single record.
- Returns:
- array
Reimplemented from soo_txp_select.
Definition at line 533 of file soo_txp_obj.php.
soo_txp_left_join::rows | ( | ) |
Override parent function; return all records.
- Returns:
- array
Reimplemented from soo_txp_select.
Definition at line 541 of file soo_txp_obj.php.
soo_txp_left_join::select | ( | $ | list = '*' |
) |
Add items to the SELECT array from the left table.
- Parameters:
-
list comma-separated list, or array, of items to select
Reimplemented from soo_txp_select.
Definition at line 458 of file soo_txp_obj.php.
soo_txp_left_join::select_join | ( | $ | list = '*' |
) |
Add items to the SELECT array from the join table.
- Parameters:
-
list comma-separated list, or array, of items to select
Definition at line 466 of file soo_txp_obj.php.
soo_txp_left_join::sql | ( | ) |
Assemble query.
- Returns:
- string
Reimplemented from soo_txp_select.
Definition at line 549 of file soo_txp_obj.php.
soo_txp_left_join::where | ( | $ | column, | |
$ | value, | |||
$ | operator = '=' , |
|||
$ | join = '' | |||
) |
Add expression to WHERE clause, referring to the left table.
- Parameters:
-
column Column name value Column value operator Comparison operator join AND or OR
Reimplemented from soo_txp_query.
Definition at line 484 of file soo_txp_obj.php.
soo_txp_left_join::where_join | ( | $ | column, | |
$ | value, | |||
$ | operator = '=' , |
|||
$ | join = '' | |||
) |
Add expression to WHERE clause, referring to the join table.
- Parameters:
-
column Column name value Column value operator Comparison operator join AND or OR
Definition at line 495 of file soo_txp_obj.php.
soo_txp_left_join::where_join_null | ( | $ | column | ) |
Add an IS NULL expression, for selecting only items not in the join table.
- Parameters:
-
column Key column in join table
Definition at line 503 of file soo_txp_obj.php.
The documentation for this class was generated from the following file:
Generated on Fri Jan 7 2011 14:35:01 for soo_txp_obj by Doxygen 1.7.1