Interface

eZ\Publish\Core\Persistence\Database\DeleteQuery

interface DeleteQuery implements Query

Methods

SelectQuery subSelect()

Create a subselect used with the current query.

from Query
PDOStatement prepare()

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

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

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

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

from Query
string getQuery()

Return the SQL string for this query.

from Query
string __toString()

Return the SQL string for this query.

from Query
DeleteQuery deleteFrom(string $table)

Opens the query and sets the target table to $table.

DeleteQuery where()

Adds a where clause with logical expressions to the query.

Details

in Query at line 26
public SelectQuery subSelect()

Create a subselect used with the current query.

Return Value

SelectQuery

in Query at line 31
public PDOStatement prepare()

Return Value

PDOStatement

in Query 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.

in Query 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.

in Query at line 96
public string getQuery()

Return the SQL string for this query.

Return Value

string

in Query at line 103
public string __toString()

Return the SQL string for this query.

Return Value

string

at line 28
public DeleteQuery deleteFrom(string $table)

Opens the query and sets the target table to $table.

deleteFrom() returns a pointer to $this.

Parameters

string $table

Return Value

DeleteQuery

at line 52
public DeleteQuery where()

Adds a where clause with logical expressions to the query.

where() accepts an arbitrary number of parameters. Each parameter must contain a logical expression or an array with logical expressions. where() could be invoked several times. All provided arguments added to the end of $whereString and form final WHERE clause of the query. If you specify multiple logical expression they are connected using a logical and.

Example: $q->deleteFrom( 'MyTable' )->where( $q->eq( 'id', 1 ) );

Return Value

DeleteQuery

Exceptions

QueryException if called with no parameters.