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
Methods
- 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
boolbindValue()
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
boolcloseCursor()
public
closeCursor() : true
use \OCP\DB\IResult::closeCursor on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare
Tags
Return values
trueexecute()
public
execute([array<string|int, mixed>|null $params = null ]) : IResult
Parameters
- $params : array<string|int, mixed>|null = null
Tags
Return values
IResultfetch()
public
fetch([int $fetchMode = PDO::FETCH_ASSOC ]) : mixed
use \OCP\DB\IResult::fetch on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare
Parameters
- $fetchMode : int = PDO::FETCH_ASSOC
Tags
fetchAll()
public
fetchAll([int $fetchMode = PDO::FETCH_ASSOC ]) : array<string|int, mixed>
use \OCP\DB\IResult::fetchAll on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare
Parameters
- $fetchMode : int = PDO::FETCH_ASSOC
Tags
Return values
array<string|int, mixed>fetchColumn()
public
fetchColumn() : mixed
use \OCP\DB\IResult::fetchColumn on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare
Tags
fetchOne()
public
fetchOne() : mixed
use \OCP\DB\IResult::fetchOne on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare
Tags
rowCount()
public
rowCount() : int
use \OCP\DB\IResult::rowCount on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare