Show/Hide Toolbars

Navigation: Advanced topics > Programming topics > Database API

PHPrunner32x32     PHPRunner manual


About Database API

Scroll Prev Next More

 

Database API functions similarly to the Data Access Layer (DAL) but is more convenient to use and can work with multiple connections. We would recommend using Database API, but DAL will work as well.

Methods

Method

Description

DB::SetConnection(name)

Sets current database link when working with multiple database connections.

DB::Exec(SQL)

Executes SQL query using current active connection.

DB::Query(SQL)

Executes SQL Query that returns data.

DB::LastId()

Returns last inserted autoincremented field value in the current connection.

DB::LastError()

Returns last error message in the current connection.

DB::Insert()

Adds records to database.

DB::Delete()

Deletes records from database.

DB::Select()

Retrieves data from database.

DB::PrepareSQL()

Prepares SQL query to use SQL variables