API17

JDatabaseMySQLi

From Joomla! Documentation

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JDatabaseMySQLi[edit]

Description[edit]

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.).

Methods[edit]

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[edit]

jimport( 'joomla.database.database.mysqli' );

See also[edit]


User contributed notes[edit]

Code Examples[edit]