Zend_Db_SelectClass for SQL SELECT generation and results.
Located in /Zend/Db/Select.php (line 41)
static array
$_partsInit
= array(The initial values for the $_parts array.
Zend_Db_Adapter_Abstract
$_adapter
(line 68)
Zend_Db_Adapter_Abstract object.
array
$_parts
= array() (line 95)
The component parts of a SELECT statement.
Initialized to the $_partsInit array in the constructor.
array
$_tableCols
= array() (line 102)
Tracks which columns are being select from each table and join.
distinct (line 259)
Makes the query SELECT DISTINCT.
forUpdate (line 271)
Makes the query SELECT FOR UPDATE.
from (line 299)
Adds a FROM table and optional columns to the query.
The first parameter $name can be a simple string, in which case the correlation name is generated automatically. If you want to specify the correlation name, the first parameter must be an associative array in which the key is the physical table name, and the value is the correlation name. For example, array('table' => 'alias'). The correlation name is prepended to all columns fetched for this table.
The second parameter can be a single string or Zend_Db_Expr object, or else an array of strings or Zend_Db_Expr objects.
The first parameter can be null or an empty string, in which case no correlation name is generated or prepended to the columns named in the second parameter.
getPart (line 734)
Get part of the structured information for the currect query.
group (line 579)
Adds grouping to the query.
having (line 603)
Adds a HAVING condition to the query by AND.
If a value is passed as the second param, it will be quoted and replaced into the condition wherever a question-mark appears. See where() for an example
join (line 376)
Adds a JOIN table and columns to the query.
The $name and $cols parameters follow the same logic as described in the from() method.
joinCross (line 475)
Add a CROSS JOIN table and colums to the query.
A cross join is a cartesian product; there is no join condition.
The $name and $cols parameters follow the same logic as described in the from() method.
joinFull (line 458)
Add a FULL OUTER JOIN table and colums to the query.
A full outer join is like combining a left outer join and a right outer join. All rows from both tables are included, paired with each other on the same row of the result set if they satisfy the join condition, and otherwise paired with NULLs in place of columns from the other table.
The $name and $cols parameters follow the same logic as described in the from() method.
joinInner (line 396)
Add an INNER JOIN table and colums to the query
Rows in both tables are matched according to the expression in the $cond argument. The result set is comprised of all cases where rows from the left table match rows from the right table.
The $name and $cols parameters follow the same logic as described in the from() method.
joinLeft (line 416)
Add a LEFT OUTER JOIN table and colums to the query
All rows from the left operand table are included, matching rows from the right operand table included, and the columns from the right operand table are filled with NULLs if no row exists matching the left table.
The $name and $cols parameters follow the same logic as described in the from() method.
joinNatural (line 494)
Add a NATURAL JOIN table and colums to the query.
A natural join assumes an equi-join across any column(s) that appear with the same name in both tables. Only natural inner joins are supported by this API, even though SQL permits natural outer joins as well.
The $name and $cols parameters follow the same logic as described in the from() method.
joinRight (line 437)
Add a RIGHT OUTER JOIN table and colums to the query.
Right outer join is the complement of left outer join. All rows from the right operand table are included, matching rows from the left operand table included, and the columns from the left operand table are filled with NULLs if no row exists matching the right table.
The $name and $cols parameters follow the same logic as described in the from() method.
limit (line 682)
Sets a limit count and offset to the query.
limitPage (line 696)
Sets the limit and count by page number.
order (line 652)
Adds a row order to the query.
orHaving (line 630)
Adds a HAVING condition to the query by OR.
Otherwise identical to orHaving().
orWhere (line 557)
Adds a WHERE condition to the query by OR.
Otherwise identical to where().
query (line 747)
reset (line 763)
Clear parts of the Select object, or an individual part.
where (line 530)
Adds a WHERE condition to the query by AND.
If a value is passed as the second param, it will be quoted and replaced into the condition wherever a question-mark appears. Array values are quoted and comma-separated.
Note that it is more correct to use named bindings in your queries for values other than strings. When you use named bindings, don't forget to pass the values when actually making a query:
_join (line 321)
Populate the $_parts 'join' key
Does the dirty work of populating the join key.
The $name and $cols parameters follow the same logic as described in the from() method.
_tableCols (line 713)
Adds to the internal table-to-column mapping array.
__toString (line 124)
Converts this object to an SQL SELECT string.
COLUMNS
= 'columns'
(line 46)
CROSS_JOIN
= 'cross join'
(line 60)
DISTINCT
= 'distinct'
(line 44)
FOR_UPDATE
= 'forupdate'
(line 45)
FROM
= 'from'
(line 47)
FULL_JOIN
= 'full join'
(line 59)
GROUP
= 'group'
(line 50)
HAVING
= 'having'
(line 51)
INNER_JOIN
= 'inner join'
(line 56)
JOIN
= 'join'
(line 48)
LEFT_JOIN
= 'left join'
(line 57)
LIMIT_COUNT
= 'limitcount'
(line 53)
LIMIT_OFFSET
= 'limitoffset'
(line 54)
NATURAL_JOIN
= 'natural join'
(line 61)
ORDER
= 'order'
(line 52)
RIGHT_JOIN
= 'right join'
(line 58)
WHERE
= 'where'
(line 49)
Documentation generated on Wed, 21 Feb 2007 11:59:22 -0800 by phpDocumentor 1.3.1