Database
Database Interface
The DB interface defines common methods for connectors loadable by the DB_Factory class. That means all the connectors must implement this interface in order to be pluggable into the core system. The methods it requires to be defined are described below.
array DB::getQueryStack()
Returns an array containing all the queries executed up to that point.
string DB::getLastQuery()
Returns the last query executed by the current connector.
int DB::getLastInsertID()
Returns the ID of the last row inserted into the database (resulting from running an INSERT query). If no INSERT query has been run, this method will return the special value null.
array DB::getResults()
Returns the results of the last successful query that might return a result. If no results are found, an empty array will be returned. If the query is incorrect, a DatabaseConnectionException exception is thrown.