|
Previous Page |
Solar_Sql_Select |
Next Page |
fromSelect()
public
Solar_Sql_Select
fromSelect (
string|Solar_Sql_Select $spec,
string $name,
array|string $cols default '*'
)
Adds a sub-select and columns to the query.
Parameters
- (string|Solar_Sql_Select)
$spec: If a Solar_Sql_Select object, use as the sub-select; if a string, the sub-select command string. - (string)
$name: The alias name for the sub-select. - (array|string)
$cols: The columns to retrieve from the sub-select; by default, '*' (all columns). This is unlike the normal from() and join() methods, which by default select no columns.
Returns
- (Solar_Sql_Select)
Description
Adds a sub-select and columns to the query.
The format is "FROM ($select) AS $name"; an alias name is always required so we can deconflict columns properly.
Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- __toString()
- _addSource()
- _buildFrom()
- _buildJoin()
- _buildSelect()
- _countSubSelect()
- _exception()
- _hasCountCond()
- _join()
- _multiHaving()
- _multiWhere()
- _nameCols()
- _origAlias()
- apiVersion()
- bind()
- clear()
- cols()
- countPages()
- distinct()
- dump()
- fetch()
- fetchAll()
- fetchAssoc()
- fetchCol()
- fetchOne()
- fetchPairs()
- fetchPdo()
- fetchSql()
- fetchValue()
- from()
- fromSelect()
- getPaging()
- group()
- having()
- innerJoin()
- join()
- leftJoin()
- limit()
- limitPage()
- locale()
- multiHaving()
- multiWhere()
- orHaving()
- orWhere()
- order()
- quote()
- quoteInto()
- quoteMulti()
- setPaging()
- unbind()
- where()