The main database connection

STOP: Do not write SQL queries in your code. Instead, use component methods to access and
manipulate data.

Class Methods

The following methods can be invoked on instances of this class.

instance()

Returns the main database connection instance
Connects to the database if it is not already connected.

instanceNoConnect()

Returns the main database connection instance

configConnect()

Connects to the database specified in the configuration file

setMainConnection(mixed pDB)

Sets the main connection to a database instance

getMainConnection()

Call instance() instead of this function to automatically connect to the db

disconnect()

Disconnects the current main database connection