IPreparedStatement
in
This interface allows you to prepare a database query.
This interface must not be implemented in your application but instead obtained from IDBConnection::prepare.
$prepare = $this->db->prepare($query->getSql());
Tags
Table of Contents
- bindParam() : bool
- bindValue() : bool
- closeCursor() : true
- execute() : IResult
- fetch() : mixed
- fetchAll() : array<string|int, mixed>
- fetchColumn() : mixed
- fetchOne() : mixed
- rowCount() : int
Methods
bindParam()
public
bindParam(int|string $param, mixed &$variable[, int $type = ParameterType::STRING ][, int|null $length = null ]) : bool
Parameters
- $param : int|string
- $variable : mixed
- $type : int = ParameterType::STRING
- $length : int|null = null
Tags
Return values
bool —bindValue()
public
bindValue(int|string $param, mixed $value[, int $type = ParameterType::STRING ]) : bool
Parameters
- $param : int|string
- $value : mixed
- $type : int = ParameterType::STRING
Tags
Return values
bool —closeCursor()
public
closeCursor() : true
Tags
Return values
true —execute()
public
execute([array<string|int, mixed>|null $params = null ]) : IResult
Parameters
- $params : array<string|int, mixed>|null = null
Tags
Return values
IResult —fetch()
public
fetch([int $fetchMode = PDO::FETCH_ASSOC ]) : mixed
Parameters
- $fetchMode : int = PDO::FETCH_ASSOC
Tags
Return values
mixed —fetchAll()
public
fetchAll([int $fetchMode = PDO::FETCH_ASSOC ]) : array<string|int, mixed>
Parameters
- $fetchMode : int = PDO::FETCH_ASSOC
Tags
Return values
array<string|int, mixed> —fetchColumn()
public
fetchColumn() : mixed
Tags
Return values
mixed —fetchOne()
public
fetchOne() : mixed
Tags
Return values
mixed —rowCount()
public
rowCount() : int