Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Database API

PHPrunner32x32     PHPRunner manual


About Database API

Scroll Prev Next More

 

The Database API functions similarly to the Data Access Layer (DAL) but is more convenient to use and can work with multiple connections. As DAL is deprecated, we recommend using Database API.

 

Methods

 

Method

Description

SetConnection(name)

Sets the current database link when working with multiple database connections.

Exec(SQL)

Executes an SQL query using the current active connection.

Query(SQL)

Executes an SQL Query that returns data.

LastId

Returns the last inserted autoincremented field value in the current connection.

LastError

Returns the last error message in the current connection.

Insert

Adds records to the database.

Update

Updates records in the database.

Delete

Deletes records from the database.

Select

Retrieves data from the database.

PrepareSQL

Prepares an SQL query to use with SQL variables.