JDatabaseMySQLi: Difference between revisions
From Joomla! Documentation
m →User contributed notes: moving preparation |
m moving preparation |
||
| Line 14: | Line 14: | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::__destruct | |[[API17:JDatabaseMySQLi::__destruct|__destruct]] | ||
|Destructor. | |Destructor. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::connected | |[[API17:JDatabaseMySQLi::connected|connected]] | ||
|Determines if the connection to the server is active. | |Determines if the connection to the server is active. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::dateToString | |[[API17:JDatabaseMySQLi::dateToString|dateToString]] | ||
|Method to get a object represented as a datetime string in a format recognized by the database server. | |Method to get a object represented as a datetime string in a format recognized by the database server. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::explain | |[[API17:JDatabaseMySQLi::explain|explain]] | ||
|Diagnostic method to return explain information for a query. | |Diagnostic method to return explain information for a query. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getAffectedRows | |[[API17:JDatabaseMySQLi::getAffectedRows|getAffectedRows]] | ||
|Get the number of affected rows for the previous executed SQL statement. | |Get the number of affected rows for the previous executed SQL statement. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getCollation | |[[API17:JDatabaseMySQLi::getCollation|getCollation]] | ||
|Method to get the database collation in use by sampling a text field of a table in the database. | |Method to get the database collation in use by sampling a text field of a table in the database. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getEscaped | |[[API17:JDatabaseMySQLi::getEscaped|getEscaped]] | ||
|Method to escape a string for usage in an SQL statement. | |Method to escape a string for usage in an SQL statement. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getExporter | |[[API17:JDatabaseMySQLi::getExporter|getExporter]] | ||
|Gets an exporter class object. | |Gets an exporter class object. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getImporter | |[[API17:JDatabaseMySQLi::getImporter|getImporter]] | ||
|Gets an importer class object. | |Gets an importer class object. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getNumRows | |[[API17:JDatabaseMySQLi::getNumRows|getNumRows]] | ||
|Get the number of returned rows for the previous executed SQL statement. | |Get the number of returned rows for the previous executed SQL statement. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getQuery | |[[API17:JDatabaseMySQLi::getQuery|getQuery]] | ||
|Get the current or query, or new object. | |Get the current or query, or new object. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getTableCreate | |[[API17:JDatabaseMySQLi::getTableCreate|getTableCreate]] | ||
|Shows the table CREATE statement that creates the given tables. | |Shows the table CREATE statement that creates the given tables. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getTableFields | |[[API17:JDatabaseMySQLi::getTableFields|getTableFields]] | ||
|Retrieves field information about the given tables. | |Retrieves field information about the given tables. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getTableList | |[[API17:JDatabaseMySQLi::getTableList|getTableList]] | ||
|Method to get an array of all tables in the database. | |Method to get an array of all tables in the database. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::getVersion | |[[API17:JDatabaseMySQLi::getVersion|getVersion]] | ||
|Get the version of the database connector. | |Get the version of the database connector. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::hasUTF | |[[API17:JDatabaseMySQLi::hasUTF|hasUTF]] | ||
|Determines if the database engine supports UTF-8 character encoding. | |Determines if the database engine supports UTF-8 character encoding. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::insertid | |[[API17:JDatabaseMySQLi::insertid|insertid]] | ||
|Method to get the auto-incremented value from the last INSERT statement. | |Method to get the auto-incremented value from the last INSERT statement. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::query | |[[API17:JDatabaseMySQLi::query|query]] | ||
|Execute the SQL statement. | |Execute the SQL statement. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::queryBatch | |[[API17:JDatabaseMySQLi::queryBatch|queryBatch]] | ||
|Execute a query batch. | |Execute a query batch. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::select | |[[API17:JDatabaseMySQLi::select|select]] | ||
|Select a database for use. | |Select a database for use. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::setUTF | |[[API17:JDatabaseMySQLi::setUTF|setUTF]] | ||
|Set the connection to use UTF-8 character encoding. | |Set the connection to use UTF-8 character encoding. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::transactionCommit | |[[API17:JDatabaseMySQLi::transactionCommit|transactionCommit]] | ||
|Method to commit a transaction. | |Method to commit a transaction. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::transactionRollback | |[[API17:JDatabaseMySQLi::transactionRollback|transactionRollback]] | ||
|Method to roll back a transaction. | |Method to roll back a transaction. | ||
|- | |- | ||
|public | |public | ||
|[[JDatabaseMySQLi::transactionStart | |[[API17:JDatabaseMySQLi::transactionStart|transactionStart]] | ||
|Method to initialize a transaction. | |Method to initialize a transaction. | ||
|- | |- | ||
|public static | |public static | ||
|[[JDatabaseMySQLi::test | |[[API17:JDatabaseMySQLi::test|test]] | ||
|Test to see if the MySQL connector is available. | |Test to see if the MySQL connector is available. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDatabaseMySQLi::__construct | |[[API17:JDatabaseMySQLi::__construct|__construct]] | ||
|Constructor. | |Constructor. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDatabaseMySQLi::fetchArray | |[[API17:JDatabaseMySQLi::fetchArray|fetchArray]] | ||
|Method to fetch a row from the result set cursor as an array. | |Method to fetch a row from the result set cursor as an array. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDatabaseMySQLi::fetchAssoc | |[[API17:JDatabaseMySQLi::fetchAssoc|fetchAssoc]] | ||
|Method to fetch a row from the result set cursor as an associative array. | |Method to fetch a row from the result set cursor as an associative array. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDatabaseMySQLi::fetchObject | |[[API17:JDatabaseMySQLi::fetchObject|fetchObject]] | ||
|Method to fetch a row from the result set cursor as an object. | |Method to fetch a row from the result set cursor as an object. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDatabaseMySQLi::freeResult | |[[API17:JDatabaseMySQLi::freeResult|freeResult]] | ||
|Method to free up the memory used for the result set. | |Method to free up the memory used for the result set. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/database/database/mysqli.php | * '''Defined in''' libraries/joomla/database/database/mysqli.php | ||
* '''Extends''' [[JDatabase | * '''Extends''' [[API17:JDatabase|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=== | ||
* {{JVer|11.1}} '''JDatabaseMySQLi source code''' on [[jplatform:database/database/mysqli.php|BitBucket]] | * {{JVer|11.1}} '''JDatabaseMySQLi source code''' on [[jplatform:database/database/mysqli.php|BitBucket]] | ||
* {{JVer|11.1}} Subpackage [[Subpackage Database | * {{JVer|11.1}} Subpackage [[API17:Subpackage Database|Database]] | ||
* [[JDatabaseMySQLi|Other versions of JDatabaseMySQLi]] | * [[API17:JDatabaseMySQLi|Other versions of JDatabaseMySQLi]] | ||
{{SeeAlso:JDatabaseMySQLi}} | {{SeeAlso:JDatabaseMySQLi}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
Revision as of 01:11, 12 May 2013
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 />