Statement
in package
AbstractYes
A class defining a prepared database statement.
Tags
Table of Contents
Properties
- $db : Connection
- $sql : string
Methods
- __construct() : mixed
- Constructor
- Bind() : mixed
- Bind data to the sql statements
- EOF() : bool
- Test if we are at the end of the resultset.
- Execute() : mixed
- Execute the query
- Fields() : mixed
- Retrive data fields.
- MoveFirst() : mixed
- Move to the first record of the resultset.
- MoveNext() : mixed
- Move to the next record of the resultset.
- set_bound_data() : mixed
- Set bound data
Properties
$db read-only
public
Connection
$db
The database connection
$sql read-only
public
string
$sql
The SQL query.
Methods
__construct()
Constructor
public
__construct(Connection $conn[, string $sql = null ]) : mixed
Parameters
- $conn : Connection
-
The database connection
- $sql : string = null
-
The SQL query
Bind()
Bind data to the sql statements
public
Bind(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
An array of arrays of data representing the numerous rows of the input data.
EOF()
Test if we are at the end of the resultset.
public
abstract EOF() : bool
Return values
boolExecute()
Execute the query
public
abstract Execute() : mixed
Fields()
Retrive data fields.
public
abstract Fields([string $col = null ]) : mixed
Parameters
- $col : string = null
-
The column name. If not specified, all columns will be returned.
MoveFirst()
Move to the first record of the resultset.
public
abstract MoveFirst() : mixed
MoveNext()
Move to the next record of the resultset.
public
abstract MoveNext() : mixed
set_bound_data()
Set bound data
protected
abstract set_bound_data(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
An array of arrays of data representing the numerous rows of the input data.