\JDatabase
Database connector class.
Synopsis
class JDatabase
{
- // methods
- public mixed query()
- public static array getConnectors()
- public string getErrorMsg()
- public integer getErrorNum()
- public static JDatabaseDriver getInstance()
- public static array splitSql()
- public string stderr()
- public static boolean test()
Hierarchy
Extended by
Methods
public
- getConnectors() — Get a list of available database connectors. The list will only be populated with connectors that both the class exists and the static test method returns true. This gives us the ability to have a multitude of connector classes that are self-aware as to whether or not they are able to be used on a given system.
- getErrorMsg() — Gets the error message from the database connection.
- getErrorNum() — Gets the error number from the database connection.
- getInstance() — Method to return a JDatabaseDriver instance based on the given options. There are three global options and then the rest are specific to the database driver. The 'driver' option defines which JDatabaseDriver class is used for the connection -- the default is 'mysqli'. The 'database' option determines which database is to be used for the connection. The 'select' option determines whether the connector should automatically select the chosen database.
- query() — Execute the SQL statement.
- splitSql() — Splits a string of multiple queries into an array of individual queries.
- stderr() — Return the most recent error message for the database connector.
- test() — Test to see if the connector is available.