JDatabaseMySQLi: Difference between revisions
From Joomla! Documentation
Layout updates |
Updated to r1448:247ba8d88526 |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
=={{JVer|11.1}} JDatabaseMySQLi== | |||
===Description=== | |||
{{Description:JDatabaseMySQLi}} | |||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JDatabaseMySQLi|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JDatabaseMySQLi|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
!Visibility | |||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| | |public | ||
|[[JDatabaseMySQLi::__destruct/11.1|__destruct]] | |[[JDatabaseMySQLi::__destruct/11.1|__destruct]] | ||
| | |Destructor. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::connected/11.1|connected]] | |[[JDatabaseMySQLi::connected/11.1|connected]] | ||
|Determines if the connection to the server is active. | |Determines if the connection to the server is active. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::dateToString/11.1|dateToString]] | |||
|Method to get a object represented as a datetime string in a format recognized by the database server. | |||
|- | |||
|public | |||
|[[JDatabaseMySQLi::explain/11.1|explain]] | |[[JDatabaseMySQLi::explain/11.1|explain]] | ||
|Diagnostic | |Diagnostic method to return explain information for a query. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getAffectedRows/11.1|getAffectedRows]] | |[[JDatabaseMySQLi::getAffectedRows/11.1|getAffectedRows]] | ||
| | |Get the number of affected rows for the previous executed SQL statement. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getCollation/11.1|getCollation]] | |[[JDatabaseMySQLi::getCollation/11.1|getCollation]] | ||
| | |Method to get the database collation in use by sampling a text field of a table in the database. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getEscaped/11.1|getEscaped]] | |[[JDatabaseMySQLi::getEscaped/11.1|getEscaped]] | ||
| | |Method to escape a string for usage in an SQL statement. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getExporter/11.1|getExporter]] | |||
|Gets an exporter class object. | |||
|- | |||
|public | |||
|[[JDatabaseMySQLi::getImporter/11.1|getImporter]] | |||
|Gets an importer class object. | |||
|- | |||
|public | |||
|[[JDatabaseMySQLi::getNumRows/11.1|getNumRows]] | |[[JDatabaseMySQLi::getNumRows/11.1|getNumRows]] | ||
| | |Get the number of returned rows for the previous executed SQL statement. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getQuery/11.1|getQuery]] | |||
|Get the current or query, or new object. | |||
|- | |||
|public | |||
|[[JDatabaseMySQLi::getTableCreate/11.1|getTableCreate]] | |[[JDatabaseMySQLi::getTableCreate/11.1|getTableCreate]] | ||
|Shows the CREATE | |Shows the table CREATE statement that creates the given tables. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getTableFields/11.1|getTableFields]] | |[[JDatabaseMySQLi::getTableFields/11.1|getTableFields]] | ||
|Retrieves information about the given tables. | |Retrieves field information about the given tables. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getTableList/11.1|getTableList]] | |[[JDatabaseMySQLi::getTableList/11.1|getTableList]] | ||
| | |Method to get an array of all tables in the database. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::getVersion/11.1|getVersion]] | |[[JDatabaseMySQLi::getVersion/11.1|getVersion]] | ||
| | |Get the version of the database connector. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::hasUTF/11.1|hasUTF]] | |[[JDatabaseMySQLi::hasUTF/11.1|hasUTF]] | ||
|Determines UTF | |Determines if the database engine supports UTF-8 character encoding. | ||
|- | |- | ||
|public | |||
|[[JDatabaseMySQLi::insertid/11.1|insertid]] | |[[JDatabaseMySQLi::insertid/11.1|insertid]] | ||
| | |Method to get the auto-incremented value from the last INSERT statement. | ||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::query/11.1|query]] | ||
|Execute the SQL statement. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::queryBatch/11.1|queryBatch]] | ||
|Execute a query batch. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::select/11.1|select]] | ||
|Select a database for use. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::setUTF/11.1|setUTF]] | ||
|Set the connection to use UTF-8 character encoding. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::transactionCommit/11.1|transactionCommit]] | ||
|Method to commit a transaction. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::transactionRollback/11.1|transactionRollback]] | ||
|Method to roll back a transaction. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public | ||
| | |[[JDatabaseMySQLi::transactionStart/11.1|transactionStart]] | ||
|Method to initialize a transaction. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |public static | ||
| | |[[JDatabaseMySQLi::test/11.1|test]] | ||
|Test to see if the MySQL connector is available. | |||
|- | |- | ||
| | |protected | ||
|[[JDatabaseMySQLi::__construct/11.1|__construct]] | |||
|Constructor. | |||
|[[JDatabaseMySQLi:: | |||
| | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |protected | ||
| | |[[JDatabaseMySQLi::fetchArray/11.1|fetchArray]] | ||
|Method to fetch a row from the result set cursor as an array. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |protected | ||
| | |[[JDatabaseMySQLi::fetchAssoc/11.1|fetchAssoc]] | ||
|Method to fetch a row from the result set cursor as an associative array. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |protected | ||
| | |[[JDatabaseMySQLi::fetchObject/11.1|fetchObject]] | ||
|Method to fetch a row from the result set cursor as an object. | |||
|- | |- | ||
|[[JDatabaseMySQLi:: | |protected | ||
| | |[[JDatabaseMySQLi::freeResult/11.1|freeResult]] | ||
|Method to free up the memory used for the result set. | |||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/database/database/mysqli.php | |||
* '''Extends''' [[JDatabase/11.1|JDatabase]] | |||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.database.database.mysqli' );</source> | <source lang="php">jimport( 'joomla.database.database.mysqli' );</source> | ||
===See also=== | ===See also=== | ||
* JDatabaseMySQLi source code | * {{JVer|11.1}} '''JDatabaseMySQLi source code''' on [[jplatform:database/database/mysqli.php|BitBucket]] | ||
* [[JDatabaseMySQLi|Other versions of | * {{JVer|11.1}} Subpackage [[Subpackage Database/11.1|Database]] | ||
* [[JDatabaseMySQLi|Other versions of JDatabaseMySQLi]] | |||
{{SeeAlso:JDatabaseMySQLi}} | {{SeeAlso:JDatabaseMySQLi}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JDatabaseMySQLi|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JDatabaseMySQLi|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
=== | ===User contributed notes=== | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 129: | Line 154: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
namespace=CodeExample | |||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JDatabaseMySQLi]]</noinclude> | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JDatabaseMySQLi]]</noinclude> | ||
Revision as of 22:57, 27 April 2011
JDatabaseMySQLi
Description
Template:Description:JDatabaseMySQLi [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __destruct | Destructor. |
| public | connected | Determines if the connection to the server is active. |
| public | dateToString | Method to get a object represented as a datetime string in a format recognized by the database server. |
| public | explain | Diagnostic method to return explain information for a query. |
| public | getAffectedRows | Get the number of affected rows for the previous executed SQL statement. |
| public | getCollation | Method to get the database collation in use by sampling a text field of a table in the database. |
| public | getEscaped | Method to escape a string for usage in an SQL statement. |
| public | getExporter | Gets an exporter class object. |
| public | getImporter | Gets an importer class object. |
| public | getNumRows | Get the number of returned rows for the previous executed SQL statement. |
| public | getQuery | Get the current or query, or new object. |
| public | getTableCreate | Shows the table CREATE statement that creates the given tables. |
| public | getTableFields | Retrieves field information about the given tables. |
| public | getTableList | Method to get an array of all tables in the database. |
| public | getVersion | Get the version of the database connector. |
| public | hasUTF | Determines if the database engine supports UTF-8 character encoding. |
| public | insertid | Method to get the auto-incremented value from the last INSERT statement. |
| public | query | Execute the SQL statement. |
| public | queryBatch | Execute a query batch. |
| public | select | Select a database for use. |
| public | setUTF | Set the connection to use UTF-8 character encoding. |
| public | transactionCommit | Method to commit a transaction. |
| public | transactionRollback | Method to roll back a transaction. |
| public | transactionStart | Method to initialize a transaction. |
| public static | test | Test to see if the MySQL connector is available. |
| protected | __construct | Constructor. |
| protected | fetchArray | Method to fetch a row from the result set cursor as an array. |
| protected | fetchAssoc | Method to fetch a row from the result set cursor as an associative array. |
| protected | fetchObject | Method to fetch a row from the result set cursor as an object. |
| protected | freeResult | Method to free up the memory used for the result set. |
- Defined in libraries/joomla/database/database/mysqli.php
- Extends JDatabase
Importing
jimport( 'joomla.database.database.mysqli' );
See also
JDatabaseMySQLi source code on BitBucket
Subpackage Database- Other versions of JDatabaseMySQLi
Template:SeeAlso:JDatabaseMySQLi [Edit See Also]
User contributed notes
<CodeExamplesForm />