Methods
All methods in the Solar_Sql_Select
class.
Public
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
__toString()
-
Returns this object as an SQL statement string.
-
bind()
-
Adds data to bind into the query.
-
clear()
-
Clears query properties and row sources.
-
cols()
-
Adds 1 or more columns to the SELECT, without regard to a FROM or JOIN.
-
compoundLimit()
-
Sets a compound limit count and offset to the query; used only in UNION (etc) queries.
-
compoundLimitPage()
-
Sets the compound limit and count by page number; used only in UNION (etc) queries.
-
compoundOrder()
-
Adds a compound row order to the query; used only in UNION (etc) queries.
-
countPages()
-
Get the count of rows and number of pages for the current query.
-
distinct()
-
Makes the query SELECT DISTINCT.
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
fetch()
-
Fetch the results based on the current query properties.
-
fetchAll()
-
Fetches all rows from the database using sequential keys.
-
fetchAssoc()
-
Fetches all rows from the database using associative keys (defined by the first column).
-
fetchCol()
-
Fetches the first column of all rows as a sequential array.
-
fetchOne()
-
Fetches one row from the database.
-
fetchPairs()
-
Fetches an associative array of all rows as key-value pairs (first column is the key, second column is the value).
-
fetchPdo()
-
Fetches a PDOStatement result object.
-
fetchSql()
-
Builds the SQL statement and returns it as a string instead of executing it.
-
fetchValue()
-
Fetches the very first value (i.e., first column of the first row).
-
from()
-
Adds a FROM table and columns to the query.
-
fromSelect()
-
Adds a sub-select and columns to the query.
-
getPaging()
-
Gets the number of rows per page.
-
group()
-
Adds grouping to the query.
-
having()
-
Adds a HAVING condition to the query by AND.
-
innerJoin()
-
Adds an INNER JOIN table and columns to the query.
-
innerJoinSelect()
-
Adds an INNER JOIN sub-select and columns to the query.
-
join()
-
Adds a JOIN table and columns to the query.
-
leftJoin()
-
Adds a LEFT JOIN table and columns to the query.
-
leftJoinSelect()
-
Adds a LEFT JOIN sub-select and columns to the query.
-
limit()
-
Sets a limit count and offset to the query.
-
limitPage()
-
Sets the limit and count by page number.
-
locale()
-
Looks up class-specific locale strings based on a key.
-
multiHaving()
-
Adds multiple HAVING conditions to the query.
-
multiJoin()
-
Adds multiple JOINs to the query.
-
multiWhere()
-
Adds multiple WHERE conditions to the query.
-
orHaving()
-
Adds a HAVING condition to the query by OR.
-
orWhere()
-
Adds a WHERE condition to the query by OR.
-
order()
-
Adds a row order to the query.
-
quote()
-
Safely quotes a value for an SQL statement.
-
quoteInto()
-
Quotes a value and places into a piece of text at a placeholder.
-
quoteMulti()
-
Quote multiple text-and-value pieces.
-
setPaging()
-
Sets the number of rows per page.
-
unbind()
-
Unsets bound data.
-
union()
-
Takes the current select properties and prepares them for UNION with the next set of select properties.
-
unionAll()
-
Takes the current select properties and prepares them for UNION ALL with the next set of select properties.
-
where()
-
Adds a WHERE condition to the query by AND.
Protected
-
_addCompound()
-
Support method for adding compound ('UNION', 'UNION ALL') queries based on the current object properties.
-
_addSource()
-
Adds a row source (from table, from select, or join) to the sources array.
-
_build()
-
Support method for building corrected parts from sources.
-
_buildConfig()
-
Builds and returns the default config for a class, including all configs inherited from its parents.
-
_buildFrom()
-
Builds a part element in place using a 'from' source.
-
_buildJoin()
-
Builds a part element in place using a 'join' source.
-
_buildSelect()
-
Builds a part element in place using a 'select' source.
-
_clearCompound()
-
Clears only the compound elements, not the current select properties and row sources.
-
_clearParts()
-
Clears only the current select properties and row sources, not compound elements.
-
_countSubSelect()
-
When doing a countPages(), count using a subselect.
-
_exception()
-
Convenience method for returning exceptions with localized text.
-
_hasCountCond()
-
Determines if there is a COUNT() in any of the condition snippets.
-
_join()
-
Support method for adding JOIN clauses.
-
_multiHaving()
-
Backend support for multiHaving().
-
_multiWhere()
-
Backend support for multiWhere().
-
_nameCols()
-
Support method for finding a table name and column names.
-
_origAlias()
-
Returns an identifier as an "original" name and an "alias".
-
_postConfig()
-
A hook that activates after _buildConfig() in the constructor.
-
_postConstruct()
-
Post-construction tasks to complete object construction.
-
_preConfig()
-
A hook that activates before _buildConfig() in the constructor.
-
_prepareSubSelect()
-
Prepares a select statement for use as a sub-select; returns strings as they are, but converts Solar_Sql_Select objects to strings after merging bind values.
Private
None.