glFusion Wiki

Site Tools


DB_ Database Functions

The high level database functions for glFusion. These functions are defined in lib-database.php which is always included by glFusion.

Function Description
DB_affectedRows Retrieves the number of effected rows for last query.
DB_change Changes records in a table.
DB_checkTableExists Check if a table exists.
DB_copy Copies a record from one table to another.
DB_count Count records in a table.
DB_createDatabaseStructures Creates database structures for fresh installation.
DB_delete Deletes data from the database.
DB_displayError Turn on / off error display.
DB_doDatabaseUpgrade Executes the sql upgrade script(s).
DB_error Returns an database error message.
DB_fetchArray Retrieves record from a recordset.
DB_fieldName Retrieves returns the field name for a field.
DB_getItem Gets a single item from the database.
DB_insertId Returns the last ID inserted.
DB_lockTable Locks a table for write operations.
DB_numFields Retrieves the number of fields in a recordset.
DB_numRows Retrieves the number of rows in a recordset.
DB_query Executes a query on the db server.
DB_result Retrieves the contents of a field.
DB_save Saves information to the database.
DB_setDebug Turns debug mode on for the database library.
DB_unlockTable Unlock a table.
glfusion/development/api/db.txt · Last modified: 2016/10/09 10:09 (external edit)

Page Tools