JDatabaseMySQL
From Joomla! Documentation
(Difference between revisions)
(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. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/connected|connected]] |
|Determines if the connection to the server is active. | |Determines if the connection to the server is active. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/explain|explain]] |
|Diagnostic function. | |Diagnostic function. | ||
|- | |- | ||
| − | |[[ | + | |[[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. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getCollation|getCollation]] |
| − | + | ||
| − | + | ||
| − | + | ||
|Get the database collation. | |Get the database collation. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getEscaped|getEscaped]] |
| − | + | ||
| − | + | ||
| − | + | ||
|Get a database escaped string. | |Get a database escaped string. | ||
|- | |- | ||
| − | |[[ | + | |[[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. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getTableCreate|getTableCreate]] |
|Shows the CREATE TABLE statement that creates the given tables. | |Shows the CREATE TABLE statement that creates the given tables. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getTableFields|getTableFields]] |
|Retrieves information about the given tables. | |Retrieves information about the given tables. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getTableList|getTableList]] |
|Lists tables in a database. | |Lists tables in a database. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/getVersion|getVersion]] |
|Get the version of the database connector. | |Get the version of the database connector. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/hasUTF|hasUTF]] |
|Determines UTF support. | |Determines UTF support. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/insertid|insertid]] |
|Gets the ID generated from the previous INSERT operation. | |Gets the ID generated from the previous INSERT operation. | ||
|- | |- | ||
| − | |[[ | + | |[[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. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadAssoc|loadAssoc]] |
|Fetch a result row as an associative array. | |Fetch a result row as an associative array. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadAssocList|loadAssocList]] |
|Loads an associative list of database rows. | |Loads an associative list of database rows. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadObject|loadObject]] |
|Loads the first row of a query into an object. | |Loads the first row of a query into an object. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadObjectList|loadObjectList]] |
|Loads a list of database objects. | |Loads a list of database objects. | ||
|- | |- | ||
| − | |[[ | + | |[[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. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadResultArray|loadResultArray]] |
|Loads an array of single field results into an array. | |Loads an array of single field results into an array. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadRow|loadRow]] |
|Loads the first row returned by the query. | |Loads the first row returned by the query. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/loadRowList|loadRowList]] |
|Loads a list of database rows (numeric column indexing). | |Loads a list of database rows (numeric column indexing). | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/query|query]] |
|Execute the query. | |Execute the query. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/queryBatch|queryBatch]] |
|Execute a batch query. | |Execute a batch query. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/select|select]] |
|Select a database for use | |Select a database for use | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/setUTF|setUTF]] |
|Custom settings for UTF support. | |Custom settings for UTF support. | ||
|- | |- | ||
| − | |[[ | + | |[[JDatabaseMySQL/test|test]] |
|Tests to see if the connector is available. | |Tests to see if the connector is available. | ||
|- | |- | ||
| − | |[[ | + | |[[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
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' );