CMS Made Simple API

Statement
in package

AbstractYes

A class defining a prepared database statement.

Tags
author

Robert Campbell

copyright

Copyright (c) 2017, Robert Campbell calguy1000@cmsmadesimple.org

since
2.2

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

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
bool

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.

Tags
see
bind

        
On this page

Search results