category Zend
package Zend_Db
subpackage Sql

 Methods

__clone

__clone() : void

Resets the where object each time the Select is cloned.

Constructor

__construct(null | string $table) 

Parameters

$table

nullstring

Variable overloading

__get(string $name) : mixed

Parameters

$name

string

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

mixed

Specify columns from which to select

columns(array $columns, bool $prefixColumnsWithTable) : \Zend\Db\Sql\Select

Possible valid states:

array(*)

array(value, ...) value can be strings or Expression objects

array(string => value, ...) key string will be use as alias, value can be string or Expression objects

Parameters

$columns

array

$prefixColumnsWithTable

bool

Returns

Create from clause

from(string | array | \Zend\Db\Sql\TableIdentifier $table) : \Zend\Db\Sql\Select

getRawState()

getRawState($key) 

Parameters

$key

Get SQL string for statement

getSqlString(\Zend\Db\Adapter\Platform\PlatformInterface $adapterPlatform) : string

Parameters

$adapterPlatform

null\Zend\Db\Adapter\Platform\PlatformInterface

If null, defaults to Sql92

Returns

string

group()

group($group) 

Parameters

$group

Create where clause

having(\Zend\Db\Sql\Where | \Closure | string | array $predicate, string $combination) : \Zend\Db\Sql\Select

Parameters

$predicate

\Zend\Db\Sql\Where\Closurestringarray

$combination

string

One of the OP_* constants from Predicate\PredicateSet

Returns

Create join clause

join(string | array $name, string $on, string | array $columns, string $type) : \Zend\Db\Sql\Select

Parameters

$name

stringarray

$on

string

$columns

stringarray

$type

string

one of the JOIN_* constants

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

limit()

limit(int $limit) : \Zend\Db\Sql\Select

Parameters

$limit

int

Returns

offset()

offset(int $offset) : \Zend\Db\Sql\Select

Parameters

$offset

int

Returns

order()

order(string | array $order) : \Zend\Db\Sql\Select

Parameters

$order

stringarray

Returns

Prepare statement

prepareStatement(\Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\StatementContainerInterface $statementContainer) : void

reset()

reset(string $part) : \Zend\Db\Sql\Select

Parameters

$part

string

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

setSpecification()

setSpecification($index, $specification) 

Parameters

$index

$specification

Create where clause

where(\Zend\Db\Sql\Where | \Closure | string | array $predicate, string $combination) : \Zend\Db\Sql\Select

Parameters

$predicate

\Zend\Db\Sql\Where\Closurestringarray

$combination

string

One of the OP_* constants from Predicate\PredicateSet

Returns

createSqlFromSpecificationAndParameters()

createSqlFromSpecificationAndParameters($specification, $parameters) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::createSqlFromSpecificationAndParameters()

Parameters

$specification

$parameters

Exceptions

\Zend\Db\Sql\Exception\RuntimeException

Returns

string

processExpression()

processExpression(\Zend\Db\Sql\ExpressionInterface $expression, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, $namedParameterPrefix) 
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::processExpression()

Parameters

$expression

$platform

$adapter

$namedParameterPrefix

processGroup()

processGroup(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processHaving()

processHaving(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processJoins()

processJoins(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processLimit()

processLimit(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processOffset()

processOffset(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processOrder()

processOrder(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processSelect()

processSelect(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

processSubSelect()

processSubSelect(\Zend\Db\Sql\Select $subselect, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::processSubSelect()

Parameters

$subselect

$platform

$adapter

$parameterContainer

processWhere()

processWhere(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Adapter $adapter, \Zend\Db\Adapter\ParameterContainer $parameterContainer) 

Parameters

$platform

$adapter

$parameterContainer

 Properties

 

$having

$having : \Zend\Db\Sql\Having

magic
property
 

$where

$where : \Zend\Db\Sql\Where

magic
property
 

$columns

$columns : array

 

$group

$group : null | array

 

$having

$having : null | string | array

 

$joins

$joins : array

 

$limit

$limit : int | null

 

$offset

$offset : int | null

 

$order

$order : null | string

 

$prefixColumnsWithTable

$prefixColumnsWithTable : bool

 

$processInfo

$processInfo : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::$$processInfo
 

<p>Specifications</p>

$specifications : array

 

$table

$table : string | \Zend\Db\Sql\TableIdentifier

 

$tableReadOnly

$tableReadOnly : bool

 

$where

$where : \Zend\Db\Sql\Where

 Constants

 

COLUMNS

COLUMNS 

 

GROUP

GROUP 

 

HAVING

HAVING 

 

JOINS

JOINS 

 

JOIN_INNER

JOIN_INNER 

 

JOIN_LEFT

JOIN_LEFT 

 

JOIN_OUTER

JOIN_OUTER 

 

JOIN_RIGHT

JOIN_RIGHT 

 

LIMIT

LIMIT 

 

OFFSET

OFFSET 

 

ORDER

ORDER 

 

ORDER_ASCENDING

ORDER_ASCENDING 

 

ORDER_DESCENDING

ORDER_DESCENDING 

 

SELECT

SELECT 

 

SQL_STAR

SQL_STAR 

 

TABLE

TABLE 

 

WHERE

WHERE