CodeIgniter v4.5 API

PreparedQueryInterface

Tags
template

TConnection

template

TStatement

template

TResult

Table of Contents

Methods

close()  : bool
Explicity closes the statement.
execute()  : bool|ResultInterface
Takes a new set of data and runs it against the currently prepared query. Upon success, will return a Results object.
getErrorCode()  : int
Returns the error code created while executing this statement.
getErrorMessage()  : string
Returns the error message created while executing this statement.
getQueryString()  : string
Returns the SQL that has been prepared.
prepare()  : $this
Prepares the query against the database, and saves the connection info necessary to execute the query later.

Methods

close()

Explicity closes the statement.

public close() : bool
Tags
throws
BadMethodCallException
Return values
bool

execute()

Takes a new set of data and runs it against the currently prepared query. Upon success, will return a Results object.

public execute(mixed ...$data) : bool|ResultInterface
Parameters
$data : mixed
Tags
phpstan-return

bool|ResultInterface<TConnection, TResult>

Return values
bool|ResultInterface

getErrorCode()

Returns the error code created while executing this statement.

public getErrorCode() : int
Return values
int

getErrorMessage()

Returns the error message created while executing this statement.

public getErrorMessage() : string
Return values
string

getQueryString()

Returns the SQL that has been prepared.

public getQueryString() : string
Return values
string

prepare()

Prepares the query against the database, and saves the connection info necessary to execute the query later.

public prepare(string $sql[, array<string|int, mixed> $options = [] ]) : $this
Parameters
$sql : string
$options : array<string|int, mixed> = []
Return values
$this

        
On this page

Search results