Actions

API17

Difference between revisions of "JDatabaseMySQLi"

From Joomla! Documentation

(Bulk upload by Doxiki2)
 
m (moving preparation)
 
(5 intermediate revisions by 2 users not shown)
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>
{{Description:JDatabaseMySQLi}}
 
===Defined in===
 
libraries/joomla/database/database/mysqli.php
 
===Subpackage===
 
[[Subpackage Database/11.1|Database]]
 
===Extends===
 
[[JDatabase/11.1|JDatabase]]
 
===Extended by===
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 +
!Visibility
 
!Method name
 
!Method name
 
!Description
 
!Description
 
|-
 
|-
|[[JDatabaseMySQLi::__construct/11.1|__construct]]
+
|public
|Database object constructor.  
+
|[[API17:JDatabaseMySQLi::__destruct|__destruct]]
 +
|Destructor.  
 
|-
 
|-
|[[JDatabaseMySQLi::__destruct/11.1|__destruct]]
+
|public
|Database object destructor.
+
|[[API17:JDatabaseMySQLi::connected|connected]]
|-
+
|[[JDatabaseMySQLi::connected/11.1|connected]]
+
 
|Determines if the connection to the server is active.  
 
|Determines if the connection to the server is active.  
 
|-
 
|-
|[[JDatabaseMySQLi::explain/11.1|explain]]
+
|public
|Diagnostic function.  
+
|[[API17:JDatabaseMySQLi::dateToString|dateToString]]
 +
|Method to get a  object represented as a datetime string in a format recognized by the database server.  
 
|-
 
|-
|[[JDatabaseMySQLi::getAffectedRows/11.1|getAffectedRows]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::explain|explain]]
 +
|Diagnostic method to return explain information for a query.  
 
|-
 
|-
|[[JDatabaseMySQLi::getCollation/11.1|getCollation]]
+
|public
|Assumes database collation in use by sampling one text field in one table.  
+
|[[API17:JDatabaseMySQLi::getAffectedRows|getAffectedRows]]
 +
|Get the number of affected rows for the previous executed SQL statement.  
 
|-
 
|-
|[[JDatabaseMySQLi::getEscaped/11.1|getEscaped]]
+
|public
|Get a database escaped string.  
+
|[[API17:JDatabaseMySQLi::getCollation|getCollation]]
 +
|Method to get the database collation in use by sampling a text field of a table in the database.  
 
|-
 
|-
|[[JDatabaseMySQLi::getNumRows/11.1|getNumRows]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::getEscaped|getEscaped]]
 +
|Method to escape a string for usage in an SQL statement.  
 
|-
 
|-
|[[JDatabaseMySQLi::getTableCreate/11.1|getTableCreate]]
+
|public
|Shows the CREATE TABLE statement that creates the given tables.  
+
|[[API17:JDatabaseMySQLi::getExporter|getExporter]]
 +
|Gets an exporter class object.  
 
|-
 
|-
|[[JDatabaseMySQLi::getTableFields/11.1|getTableFields]]
+
|public
|Retrieves information about the given tables.  
+
|[[API17:JDatabaseMySQLi::getImporter|getImporter]]
 +
|Gets an importer class object.  
 
|-
 
|-
|[[JDatabaseMySQLi::getTableList/11.1|getTableList]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::getNumRows|getNumRows]]
 +
|Get the number of returned rows for the previous executed SQL statement.  
 
|-
 
|-
|[[JDatabaseMySQLi::getVersion/11.1|getVersion]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::getQuery|getQuery]]
 +
|Get the current or query, or new  object.  
 
|-
 
|-
|[[JDatabaseMySQLi::hasUTF/11.1|hasUTF]]
+
|public
|Determines UTF support.  
+
|[[API17:JDatabaseMySQLi::getTableCreate|getTableCreate]]
 +
|Shows the table CREATE statement that creates the given tables.  
 
|-
 
|-
|[[JDatabaseMySQLi::insertid/11.1|insertid]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::getTableFields|getTableFields]]
 +
|Retrieves field information about the given tables.  
 
|-
 
|-
|[[JDatabaseMySQLi::insertObject/11.1|insertObject]]
+
|public
|Inserts a row into a table based on an objects properties.  
+
|[[API17:JDatabaseMySQLi::getTableList|getTableList]]
 +
|Method to get an array of all tables in the database.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadAssoc/11.1|loadAssoc]]
+
|public
|Fetch a result row as an associative array.  
+
|[[API17:JDatabaseMySQLi::getVersion|getVersion]]
 +
|Get the version of the database connector.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadAssocList/11.1|loadAssocList]]
+
|public
|Load a assoc list of database rows.  
+
|[[API17:JDatabaseMySQLi::hasUTF|hasUTF]]
 +
|Determines if the database engine supports UTF-8 character encoding.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadNextObject/11.1|loadNextObject]]
+
|public
|Load the next row returned by the query.  
+
|[[API17:JDatabaseMySQLi::insertid|insertid]]
 +
|Method to get the auto-incremented value from the last INSERT statement.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadNextRow/11.1|loadNextRow]]
+
|public
|Load the next row returned by the query.  
+
|[[API17:JDatabaseMySQLi::query|query]]
 +
|Execute the SQL statement.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadObject/11.1|loadObject]]
+
|public
|This global function loads the first row of a query into an object.  
+
|[[API17:JDatabaseMySQLi::queryBatch|queryBatch]]
 +
|Execute a query batch.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadObjectList/11.1|loadObjectList]]
+
|public
|Load a list of database objects.  
+
|[[API17:JDatabaseMySQLi::select|select]]
 +
|Select a database for use.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadResult/11.1|loadResult]]
+
|public
|This method loads the first field of the first row returned by the query.  
+
|[[API17:JDatabaseMySQLi::setUTF|setUTF]]
 +
|Set the connection to use UTF-8 character encoding.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadResultArray/11.1|loadResultArray]]
+
|public
|Load an array of single field results into an array.  
+
|[[API17:JDatabaseMySQLi::transactionCommit|transactionCommit]]
 +
|Method to commit a transaction.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadRow/11.1|loadRow]]
+
|public
|Description.  
+
|[[API17:JDatabaseMySQLi::transactionRollback|transactionRollback]]
 +
|Method to roll back a transaction.  
 
|-
 
|-
|[[JDatabaseMySQLi::loadRowList/11.1|loadRowList]]
+
|public
|Load a list of database rows (numeric column indexing).  
+
|[[API17:JDatabaseMySQLi::transactionStart|transactionStart]]
 +
|Method to initialize a transaction.  
 
|-
 
|-
|[[JDatabaseMySQLi::query/11.1|query]]
+
|public static
|Execute the query.  
+
|[[API17:JDatabaseMySQLi::test|test]]
 +
|Test to see if the MySQL connector is available.  
 
|-
 
|-
|[[JDatabaseMySQLi::queryBatch/11.1|queryBatch]]
+
|protected
|Execute a batch query.  
+
|[[API17:JDatabaseMySQLi::__construct|__construct]]
 +
|Constructor.  
 
|-
 
|-
|[[JDatabaseMySQLi::select/11.1|select]]
+
|protected
|Select a database for use.  
+
|[[API17:JDatabaseMySQLi::fetchArray|fetchArray]]
 +
|Method to fetch a row from the result set cursor as an array.  
 
|-
 
|-
|[[JDatabaseMySQLi::setUTF/11.1|setUTF]]
+
|protected
|Custom settings for UTF support.  
+
|[[API17:JDatabaseMySQLi::fetchAssoc|fetchAssoc]]
 +
|Method to fetch a row from the result set cursor as an associative array.  
 
|-
 
|-
|[[JDatabaseMySQLi::test/11.1|test]]
+
|protected
|Test to see if the MySQLi connector is available.  
+
|[[API17:JDatabaseMySQLi::fetchObject|fetchObject]]
 +
|Method to fetch a row from the result set cursor as an object.  
 
|-
 
|-
|[[JDatabaseMySQLi::updateObject/11.1|updateObject]]
+
|protected
|Description.  
+
|[[API17:JDatabaseMySQLi::freeResult|freeResult]]
 +
|Method to free up the memory used for the result set.  
 
|-
 
|-
 
|}
 
|}
 +
* '''Defined in''' libraries/joomla/database/database/mysqli.php
 +
* '''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===
* [[JDatabaseMySQLi|Other versions of this class]]
+
* {{JVer|11.1}} '''JDatabaseMySQLi source code''' on [[jplatform:database/database/mysqli.php|BitBucket]]
 +
* {{JVer|11.1}} Subpackage [[API17:Subpackage Database|Database]]
 +
* [[API17: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>
===Examples===
+
===User contributed notes===
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 127: 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 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 19:11, 11 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JDatabaseMySQLi

Description

JDatabaseMySQLi is a concrete database handler class for MySQL. The MySQLi driver can only be used for MySQL 4.1 and higher. The "i" at the end stands for "improved" (faster, better, etc.). [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

  • Joomla 11.1 JDatabaseMySQLi source code on BitBucket
  • Joomla 11.1 Subpackage Database
  • Other versions of JDatabaseMySQLi

SeeAlso:JDatabaseMySQLi [Edit See Also]

User contributed notes

<CodeExamplesForm />