JoomlaVM

  • Increase font size
  • Default font size
  • Decrease font size
Home Joomla development joomla database class and Functions

joomla database class and Functions

Generic database connector class.

An instance of this class, called $database, is created using the current Joomla configuration variables when each page is loaded. Therefore you do not generally need to create new instance of this object.  If you need to access to $database within a function then remember to declare it as global.

Beginning with version 1.1, Joomla is being adapted to use the ADOdb database abstraction library (adodb.sourceforge.net).  Some new methods have been added and some minor changes to existing methods have been made in order to accommodate this and these changes have been documented appropriately.  Joomla versions prior to 1.1 support the MySQL database (www.mysql.com) only.
Joomla version Unknown
Defined in

includes/database.php
Functions

database
    Constructor for the database class.
explain
    Performs an SQL EXPLAIN on the current SQL query string.
getErrorMsg
    Returns the most recent database error message.
getErrorNum
    Returns the most recent database error code.


getEscaped
    Escapes characters with special meaning for the database.
getNullDate
    Returns the string to be used to represent a null date. This method was introduced in Joomla 1.1.
getNumRows
    Returns the number of rows returned by a database query.
getPrefix
    Returns the current database table prefix code. This method was introduced in Joomla 1.1.
getQuery
    Returns the current value of the internal SQL query string.
getTableCreate
    Creates one or more tables in the database.
getTableFields
    Returns a list of fields given a list of tables.
getTableList
    Returns a list of all the tables in the database.
insertid
    Returns the unique record number of the last record to be inserted into a database table.
insertObject
    Inserts an object into a database table.
loadAssocList
    Loads an associative list of database rows.
loadObject
    Loads an object with fields from the first row returned by the current SQL query.
loadObjectList
    Returns an array of database objects using the current SQL query.
loadResult
    Returns the first field of the first row returned by the database query.
loadResultArray
    Returns an array containing a single field from all the rows returned by the database query.
loadRow
    Returns the first row of the current query as an array.
loadRowList
    Returns an array of database rows with numeric column indexing.
NameQuote
    Quotes an identifier such as a database table name, field name, etc., using database-specific quote marks. This method was introduced in Joomla 1.1.
query
    Executes the current SQL query string.
query_batch
    Executes the current SQL query string as a single transaction.
Quote
    Returns a quoted string with characters escaped.
setQuery
    Sets the SQL query string for later execution.
schemaUpdate
    Updates the AXMLS schema. This method was introduced in Joomla 1.1.
stderr
    Returns the last database error message in a standard format.
updateObject
    Updates a database table row using data contained in an object.
 

VirtueMart Shopping Cart

VirtueMart
Your Cart is currently empty.

Newsletter


Newsflash

VMDL importing data instantly

(We just release a new version for Virtuemart 2.0 and Joomla 1.6/1.7 , Please check it here :VMDL for VM2.0 and Joomla 1.6/joomla 1.7)

Vmdl tool allows users to easily create virtuemart product item from data stored in excel and CSV files. When used with vmdl , the powerful functions and cutomer service that also allows for the creation of more complex structured product items,include all of attributes and product types,vmdl allows for the easy transfer of data from excel file into your virtuemart product catalogues, product listings, price listings, and more. With or without vmdl, products input is an essential time-saving tool for any Joomla and Virtuemart site. this new edtion is integrated into the VM backend,more convenient to use,less steps,adding check module,and more quick loading.

Feature Summary

  • Import format CSV file, regardless of size
  • auto-creates categories and auto-creating product item, then auto-loading product detail
  • Support remote host data loading,help you create data anywhere
  • help Service —Help clients use this tool and fill the excel file correctly at first time