A simple SQL query object for SELECT statements.
Usage of this class in Cough allows for sharing base SQL so that less SQL code is copied and pasted amongst classes.
For example, if there is a Product object which has complicated SELECT SQL that joins into other tables, pulls extra data in the SELECT clause, includes a GROUP BY, and has default WHERE criteria like "is_retired = 0", then by using this you don't have to copy all those common parts into the all the collection static methods. Instead, they can share the base SQL and just add what they need. For example, to pull a single product one might do:
Another example might be pulling all products that have the same manufacturer ID:
Located in /as_query/As_SelectQuery.class.php (line 37)
As_Query | --As_SelectQuery
Inherited from As_Query
As_Query::$db
Add optional select options, e.g. SQL_CALC_FOUND_ROWS, SQL_NO_CACHE
Inherited From As_Query
As_Query::__construct()
As_Query::add()
As_Query::buildWhereSql()
As_Query::execute()
As_Query::getEqualityOperatorFromValue()
As_Query::getInsertQuery()
As_Query::getSelectQuery()
As_Query::getString()
As_Query::getUpdateQuery()
As_Query::remapCriteria()
As_Query::run()
As_Query::setDb()
As_Query::__toString()
Documentation generated on Fri, 19 Dec 2008 11:03:45 -0600 by phpDocumentor 1.4.0