Class representing a connection to a database.
Not intended to be instantiated by end users; see db_get_object for documentation about connecting to a database.
Located in /include/db.php (line 120)
Class | Description |
---|---|
db_postgresql | Class representing a connection to a PostgreSQL database. |
db_mysql | Class representing a connection to a MySQL database. |
Begin a database transaction.
Returns false if transactions are not supported.
Closes the database connection.
While this should automatically be done by PHP, in case a script makes lots of connections this can be necessary to avoid resource shortages. Returns true on success or false on failure.
Commit to a database transaction.
Returns false if transactions are not supported.
Set whether errors are fatal.
If this method is called with a argument that evaluate to true, all further database queries will complete silently, and errors will be ignored. It returns the previous value of the ignore_errors setting.
Perform an SQL query on the database.
Perfoms the supplied query on the connected database, and returns a newly created db_result object (of the correct type) that represents the result.
Returns the amount of queries performed using this connection.
Note that this only counts the number of queries executed using this object -- using multiple database objects will skew the results.
Returns the SQL escaped version of the string.
This uses the appropriate internal PHP function to escape the string in a database specific way, thus making it safe to use in queries. Always use this before sending user input to the database! It returns the escaped string surrounded by single quotes.
Rollback a database transaction.
Returns false if transactions are not supported.
Documentation generated on Fri, 30 Jun 2006 10:31:37 +0200 by phpDocumentor 1.3.0RC3