API17

JDatabase

From Joomla! Documentation

Revision as of 17:51, 23 April 2011 by Doxiki2 (talk | contribs) (Layout updates)

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

[Edit Descripton] Template:Description:JDatabase

Defined in[edit]

libraries/joomla/database/database.php

Subpackage[edit]

Database

Extends[edit]

JObject

Extended by[edit]

Methods[edit]

Method name Description
__construct Database object constructor.
__destruct Database object destructor.
addQuoted Adds a field or array of field names to the list that are to be quoted.
connected Determines if the connection to the server is active.
debug Sets the debug level on or off.
explain Diagnostic function.
getAffectedRows Get the affected rows by the most recent query.
getCollation Get the database collation.
getConnection Get the connection.
getConnectors Get the database connectors.
getErrorMsg Get the error message.
getErrorNum Get the error number.
getEscaped Get a database escaped string.
getLog Get a database error log.
getNullDate Get the database null date.
getNumRows Get the number of rows returned by the most recent query.
getPrefix Get the database table prefix.
getQuery Get the current or query, or new object.
getTableCreate Shows the CREATE TABLE statement that creates the given tables.
getTableFields Retrieves information about the given tables.
getTableList List tables in a database.
getTicker Get the total number of queries made.
getUTFSupport Get the database UTF-8 support.
getVersion Get the version of the database connector.
hasUTF Determines UTF support.
insertid Get the ID generated from the previous INSERT operation.
insertObject Inserts a row into a table based on an objects properties.
isQuoted Checks if field name needs to be quoted.
loadAssoc Fetch a result row as an associative array.
loadAssocList Load a associactive list of database rows.
loadNextObject Load the next row returned by the query.
loadNextRow Load the next row returned by the query.
loadObject This global function loads the first row of a query into an object.
loadObjectList Load a list of database objects.
loadResult This method loads the first field of the first row returned by the query.
loadResultArray Load an array of single field results into an array.
loadRow Load the first row returned by the query.
loadRowList Load a list of database rows (numeric column indexing).
nameQuote Quote an identifier name (field, table, etc).
query Execute the query.
queryBatch Execute a batch query.
quote Get a quoted database escaped string.
replacePrefix This function replaces a string identifier with the string held is the class variable.
setQuery Sets the SQL query string for later execution.
setUTF Custom settings for UTF support.
splitSql Splits a string of queries into an array of individual queries.
stderr Print out an error statement.
test Test to see if the MySQLi connector is available.
updateObject Update an object in the database.
getInstance Returns the global Database object, only creating it if it doesn't already exist.

Importing[edit]

jimport( 'joomla.database.database' );

See also[edit]

Template:SeeAlso:JDatabase [Edit See Also]

Examples[edit]

<CodeExamplesForm />