SlaxWeb Framework
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
SlaxWeb\Database\Interfaces\Library Interface Reference
Inheritance diagram for SlaxWeb\Database\Interfaces\Library:
Inheritance graph
[legend]

Public Member Functions

 execute (string $query, array $data=[])
 
 fetch ()
 
 lastError ()
 

Public Attributes

const DB_CUBRID = "cubrid"
 
const DB_DBLIB = "dblib"
 
const DB_FIREBIRD = "firebird"
 
const DB_IBM = "ibm"
 
const DB_INFORMIX = "informix"
 
const DB_MYSQL = "mysql"
 
const DB_OCI = "oci"
 
const DB_ODBC = "odbc"
 
const DB_PGSQL = "pgsql"
 
const DB_SQLITE = "sqlite"
 
const DB_SQLSRV = "sqlsrv"
 
const DB_4D = "4d"
 

Member Function Documentation

SlaxWeb\Database\Interfaces\Library::execute ( string  $query,
array  $data = [] 
)

Execute Query

Executes the received query and binds the received parameters into the query to decrease the chance of an SQL injection. Returns bool(true) if query was successfuly executed, and bool(false) if it was not. If the query yielded a result set, a Result object will be populated.

Parameters
string$queryThe Query to be executed
array$dataData to be bound into the Query
Returns
bool

Implemented in SlaxWeb\DatabasePDO\Library.

SlaxWeb\Database\Interfaces\Library::fetch ( )

Fetch Results

It fetches the results from the last executed statement, creates the Result object and returns it.

Returns

Implemented in SlaxWeb\DatabasePDO\Library.

SlaxWeb\Database\Interfaces\Library::lastError ( )

Get last error

Retrieves the error of the last executed query. If there was no error, an exception must be thrown.

Returns

Implemented in SlaxWeb\DatabasePDO\Library.

Member Data Documentation

const SlaxWeb\Database\Interfaces\Library::DB_CUBRID = "cubrid"

Available database drivers


The documentation for this interface was generated from the following file: