JDatabaseMySQL

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
(New page: '''JDatabaseMySQL''' is an concrete database handler class for MySQL. ===Availability=== {{JVer|1.5}} {{JVer|1.6}} ===Defined in=== /libraries/joomla/database/mysql.php ===Extends=== * ...)
 
(Methods)
Line 24: Line 24:
 
|Destructor. Makes sure database connection is closed at the end of script.
 
|Destructor. Makes sure database connection is closed at the end of script.
 
|-
 
|-
|[[JDatabase/connected|connected]]
+
|[[JDatabaseMySQL/connected|connected]]
 
|Determines if the connection to the server is active.
 
|Determines if the connection to the server is active.
 
|-
 
|-
|[[JDatabase/explain|explain]]
+
|[[JDatabaseMySQL/explain|explain]]
 
|Diagnostic function.
 
|Diagnostic function.
 
|-
 
|-
|[[JDatabase/getAffectedRows|getAffectedRows]]
+
|[[JDatabaseMySQL/getAffectedRows|getAffectedRows]]
 
|Get the number of rows affected by the most recent query.
 
|Get the number of rows affected by the most recent query.
 
|-
 
|-
|[[JDatabase/GetCol|GetCol]]
+
|[[JDatabaseMySQL/getCollation|getCollation]]
|ADODB compatibility function.
+
|-
+
|[[JDatabase/getCollation|getCollation]]
+
 
|Get the database collation.
 
|Get the database collation.
 
|-
 
|-
|[[JDatabase/getConnectors|getConnectors]]
+
|[[JDatabaseMySQL/getEscaped|getEscaped]]
|Get the database connectors.
+
|-
+
|[[JDatabase/getEscaped|getEscaped]]
+
 
|Get a database escaped string.
 
|Get a database escaped string.
 
|-
 
|-
|[[JDatabase/getNumRows|getNumRows]]
+
|[[JDatabaseMySQL/getNumRows|getNumRows]]
 
|Get the number of rows returned by the most recent query.
 
|Get the number of rows returned by the most recent query.
 
|-
 
|-
|[[JDatabase/getTableCreate|getTableCreate]]
+
|[[JDatabaseMySQL/getTableCreate|getTableCreate]]
 
|Shows the CREATE TABLE statement that creates the given tables.
 
|Shows the CREATE TABLE statement that creates the given tables.
 
|-
 
|-
|[[JDatabase/getTableFields|getTableFields]]
+
|[[JDatabaseMySQL/getTableFields|getTableFields]]
 
|Retrieves information about the given tables.
 
|Retrieves information about the given tables.
 
|-
 
|-
|[[JDatabase/getTableList|getTableList]]
+
|[[JDatabaseMySQL/getTableList|getTableList]]
 
|Lists tables in a database.
 
|Lists tables in a database.
 
|-
 
|-
|[[JDatabase/getVersion|getVersion]]
+
|[[JDatabaseMySQL/getVersion|getVersion]]
 
|Get the version of the database connector.
 
|Get the version of the database connector.
 
|-
 
|-
|[[JDatabase/hasUTF|hasUTF]]
+
|[[JDatabaseMySQL/hasUTF|hasUTF]]
 
|Determines UTF support.
 
|Determines UTF support.
 
|-
 
|-
|[[JDatabase/insertid|insertid]]
+
|[[JDatabaseMySQL/insertid|insertid]]
 
|Gets the ID generated from the previous INSERT operation.
 
|Gets the ID generated from the previous INSERT operation.
 
|-
 
|-
|[[JDatabase/insertObject|insertObject]]
+
|[[JDatabaseMySQL/insertObject|insertObject]]
 
|Inserts a row into a table based on an objects properties.
 
|Inserts a row into a table based on an objects properties.
 
|-
 
|-
|[[JDatabase/loadAssoc|loadAssoc]]
+
|[[JDatabaseMySQL/loadAssoc|loadAssoc]]
 
|Fetch a result row as an associative array.
 
|Fetch a result row as an associative array.
 
|-
 
|-
|[[JDatabase/loadAssocList|loadAssocList]]
+
|[[JDatabaseMySQL/loadAssocList|loadAssocList]]
 
|Loads an associative list of database rows.
 
|Loads an associative list of database rows.
 
|-
 
|-
|[[JDatabase/loadObject|loadObject]]
+
|[[JDatabaseMySQL/loadObject|loadObject]]
 
|Loads the first row of a query into an object.
 
|Loads the first row of a query into an object.
 
|-
 
|-
|[[JDatabase/loadObjectList|loadObjectList]]
+
|[[JDatabaseMySQL/loadObjectList|loadObjectList]]
 
|Loads a list of database objects.
 
|Loads a list of database objects.
 
|-
 
|-
|[[JDatabase/loadResult|loadResult]]
+
|[[JDatabaseMySQL/loadResult|loadResult]]
 
|Loads the first field of the first row returned by the query.
 
|Loads the first field of the first row returned by the query.
 
|-
 
|-
|[[JDatabase/loadResultArray|loadResultArray]]
+
|[[JDatabaseMySQL/loadResultArray|loadResultArray]]
 
|Loads an array of single field results into an array.
 
|Loads an array of single field results into an array.
 
|-
 
|-
|[[JDatabase/loadRow|loadRow]]
+
|[[JDatabaseMySQL/loadRow|loadRow]]
 
|Loads the first row returned by the query.
 
|Loads the first row returned by the query.
 
|-
 
|-
|[[JDatabase/loadRowList|loadRowList]]
+
|[[JDatabaseMySQL/loadRowList|loadRowList]]
 
|Loads a list of database rows (numeric column indexing).
 
|Loads a list of database rows (numeric column indexing).
 
|-
 
|-
|[[JDatabase/query|query]]
+
|[[JDatabaseMySQL/query|query]]
 
|Execute the query.
 
|Execute the query.
 
|-
 
|-
|[[JDatabase/queryBatch|queryBatch]]
+
|[[JDatabaseMySQL/queryBatch|queryBatch]]
 
|Execute a batch query.
 
|Execute a batch query.
 
|-
 
|-
|[[JDatabase/select|select]]
+
|[[JDatabaseMySQL/select|select]]
 
|Select a database for use
 
|Select a database for use
 
|-
 
|-
|[[JDatabase/setUTF|setUTF]]
+
|[[JDatabaseMySQL/setUTF|setUTF]]
 
|Custom settings for UTF support.
 
|Custom settings for UTF support.
 
|-
 
|-
|[[JDatabase/test|test]]
+
|[[JDatabaseMySQL/test|test]]
 
|Tests to see if the connector is available.
 
|Tests to see if the connector is available.
 
|-
 
|-
|[[JDatabase/updateObject|updateObject]]
+
|[[JDatabaseMySQL/updateObject|updateObject]]
 
|Updates an object in the database.
 
|Updates an object in the database.
 
|}
 
|}

Revision as of 16:01, 10 August 2009

JDatabaseMySQL is an concrete database handler class for MySQL.

Contents

Availability

Joomla 1.5 Joomla 1.6

Defined in

/libraries/joomla/database/mysql.php

Extends

Methods

Properties which do not have specific get or set methods listed here can be retrieved or set using the inherited JObject->get method.

Method name Description
__construct Constrctor. Takes database login information, and tries to connecto with the database.
__destruct Destructor. Makes sure database connection is closed at the end of script.
connected Determines if the connection to the server is active.
explain Diagnostic function.
getAffectedRows Get the number of rows affected by the most recent query.
getCollation Get the database collation.
getEscaped Get a database escaped string.
getNumRows Get the number of rows returned by the most recent query.
getTableCreate Shows the CREATE TABLE statement that creates the given tables.
getTableFields Retrieves information about the given tables.
getTableList Lists tables in a database.
getVersion Get the version of the database connector.
hasUTF Determines UTF support.
insertid Gets the ID generated from the previous INSERT operation.
insertObject Inserts a row into a table based on an objects properties.
loadAssoc Fetch a result row as an associative array.
loadAssocList Loads an associative list of database rows.
loadObject Loads the first row of a query into an object.
loadObjectList Loads a list of database objects.
loadResult Loads the first field of the first row returned by the query.
loadResultArray Loads an array of single field results into an array.
loadRow Loads the first row returned by the query.
loadRowList Loads a list of database rows (numeric column indexing).
query Execute the query.
queryBatch Execute a batch query.
select Select a database for use
setUTF Custom settings for UTF support.
test Tests to see if the connector is available.
updateObject Updates an object in the database.

Importing

jimport( 'joomla.database.mysql' );

See also

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox