Interface

eZ\Publish\Core\Persistence\Database\Query

interface Query

Methods

SelectQuery subSelect()

Create a subselect used with the current query.

PDOStatement prepare()

string bindValue($value, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the value $value to the specified variable name $placeHolder.

string bindParam($param, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the parameter $param to the specified variable name $placeHolder..

string getQuery()

Return the SQL string for this query.

string __toString()

Return the SQL string for this query.

Details

at line 26
public SelectQuery subSelect()

Create a subselect used with the current query.

Return Value

SelectQuery

at line 31
public PDOStatement prepare()

Return Value

PDOStatement

at line 60
public string bindValue($value, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the value $value to the specified variable name $placeHolder.

This method provides a shortcut for PDOStatement::bindValue when using prepared statements.

The parameter $value specifies the value that you want to bind. If $placeholder is not provided bindValue() will automatically create a placeholder for you. An automatic placeholder will be of the name 'placeholder1', 'placeholder2' etc.

For more information see {@link http://php.net/pdostatement-bindparam}

Example: $value = 2; $q->eq( 'id', $q->bindValue( $value ) ); $stmt = $q->prepare(); // the value 2 is bound to the query. $value = 4; $stmt->execute(); // executed with 'id = 2'

Parameters

$value
$placeHolder
$type

Return Value

string the placeholder name used.

at line 89
public string bindParam($param, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the parameter $param to the specified variable name $placeHolder..

This method provides a shortcut for PDOStatement::bindParam when using prepared statements.

The parameter $param specifies the variable that you want to bind. If $placeholder is not provided bind() will automatically create a placeholder for you. An automatic placeholder will be of the name 'placeholder1', 'placeholder2' etc.

For more information see {@link http://php.net/pdostatement-bindparam}

Example: $value = 2; $q->eq( 'id', $q->bindParam( $value ) ); $stmt = $q->prepare(); // the parameter $value is bound to the query. $value = 4; $stmt->execute(); // executed with 'id = 4'

Parameters

$param
$placeHolder
$type

Return Value

string the placeholder name used.

at line 96
public string getQuery()

Return the SQL string for this query.

Return Value

string

at line 103
public string __toString()

Return the SQL string for this query.

Return Value

string