Class for SQL SELECT generation and results.
Located in /Zend/Db/Select.php (line 41)
The initial values for the $_parts array.
Zend_Db_Adapter_Abstract object.
The component parts of a SELECT statement.
Initialized to the $_partsInit array in the constructor.
Tracks which columns are being select from each table and join.
Makes the query SELECT DISTINCT.
Makes the query SELECT FOR UPDATE.
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.
Get part of the structured information for the currect query.
Adds grouping to the query.
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
Adds a JOIN table and columns to the query.
The $name and $cols parameters follow the same logic as described in the from() method.
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.
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.
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.
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.
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.
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.
Sets a limit count and offset to the query.
Sets the limit and count by page number.
Adds a row order to the query.
Adds a HAVING condition to the query by OR.
Otherwise identical to orHaving().
Adds a WHERE condition to the query by OR.
Otherwise identical to where().
Clear parts of the Select object, or an individual part.
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:
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.
Adds to the internal table-to-column mapping array.
Converts this object to an SQL SELECT string.
Documentation generated on Wed, 21 Feb 2007 11:59:22 -0800 by phpDocumentor 1.3.1