The MySQLi Extension Function Summary

Summary of mysqli methods
mysqli Class
OOP InterfaceProcedural InterfaceAlias (Do not use)Description
Properties
$mysqli::affected_rowsmysqli_affected_rows()N/AGets the number of affected rows in a previous MySQL operation
$mysqli::client_infomysqli_get_client_info()N/AReturns the MySQL client version as a string
$mysqli::client_versionmysqli_get_client_version()N/AReturns MySQL client version info as an integer
$mysqli::connect_errnomysqli_connect_errno()N/AReturns the error code from last connect call
$mysqli::connect_errormysqli_connect_error()N/AReturns a string description of the last connect error
$mysqli::errnomysqli_errno()N/AReturns the error code for the most recent function call
$mysqli::errormysqli_error()N/AReturns a string description of the last error
$mysqli::field_countmysqli_field_count()N/AReturns the number of columns for the most recent query
$mysqli::host_infomysqli_get_host_info()N/AReturns a string representing the type of connection used
$mysqli::protocol_versionmysqli_get_proto_info()N/AReturns the version of the MySQL protocol used
$mysqli::server_infomysqli_get_server_info()N/AReturns the version of the MySQL server
$mysqli::server_versionmysqli_get_server_version()N/AReturns the version of the MySQL server as an integer
$mysqli::infomysqli_info()N/ARetrieves information about the most recently executed query
$mysqli::insert_idmysqli_insert_id()N/AReturns the auto generated id used in the last query
$mysqli::sqlstatemysqli_sqlstate()N/AReturns the SQLSTATE error from previous MySQL operation
$mysqli::warning_countmysqli_warning_count()N/AReturns the number of warnings from the last query for the given link
Methods
mysqli::autocommit()mysqli_autocommit()N/ATurns on or off auto-committing database modifications
mysqli::change_user()mysqli_change_user()N/AChanges the user of the specified database connection
mysqli::character_set_name()mysqli_character_set_name()N/AReturns the default character set for the database connection
mysqli::close()mysqli_close()N/ACloses a previously opened database connection
mysqli::commit()mysqli_commit()N/ACommits the current transaction
mysqli::__construct()mysqli_connect()N/AOpen a new connection to the MySQL server [Note: static (i.e. class) method]
mysqli::debug()mysqli_debug()N/APerforms debugging operations
mysqli::dump_debug_info()mysqli_dump_debug_info()N/ADump debugging information into the log
mysqli::get_charset()mysqli_get_charset()N/AReturns a character set object
mysqli::get_connection_stats()mysqli_get_connection_stats()N/AReturns client connection statistics. Available only with mysqlnd.
mysqli::get_client_info()mysqli_get_client_info()N/AReturns the MySQL client version as a string
N/Amysqli_get_client_stats()N/AReturns client per-process statistics. Available only with mysqlnd.
mysqli::get_server_info()mysqli_get_server_info()N/AReturns a string representing the version of the MySQL server that the MySQLi extension is connected to
mysqli::get_warnings()mysqli_get_warnings()N/ANOT DOCUMENTED
mysqli::init()mysqli_init()N/AInitializes MySQLi and returns an object for use with mysqli_real_connect.
mysqli::kill()mysqli_kill()N/AAsks the server to kill a MySQL thread
mysqli::more_results()mysqli_more_results()N/ACheck if there are any more query results from a multi query
mysqli::multi_query()mysqli_multi_query()N/APerforms a query on the database
mysqli::next_result()mysqli_next_result()N/APrepare next result from multi_query
mysqli::options()mysqli_options()mysqli_set_opt()Set options
mysqli::ping()mysqli_ping()N/APings a server connection, or tries to reconnect if the connection has gone down
mysqli::prepare()mysqli_prepare()N/APrepare an SQL statement for execution
mysqli::query()mysqli_query()N/APerforms a query on the database
mysqli::real_connect()mysqli_real_connect()N/AOpens a connection to a mysql server
mysqli::real_escape_string(), mysqli::escape_string()mysqli_real_escape_string()mysqli_escape_string()Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
mysqli::real_query()mysqli_real_query()N/AExecute an SQL query
mysqli::refresh()mysqli_refresh()N/AFlushes tables or caches, or resets the replication server information
mysqli::rollback()mysqli_rollback()N/ARolls back current transaction
mysqli::select_db()mysqli_select_db()N/ASelects the default database for database queries
mysqli::set_charset()mysqli_set_charset()N/ASets the default client character set
mysqli::ssl_set()mysqli_ssl_set()N/AUsed for establishing secure connections using SSL
mysqli::stat()mysqli_stat()N/AGets the current system status
mysqli::stmt_init()mysqli_stmt_init()N/AInitializes a statement and returns an object for use with mysqli_stmt_prepare
mysqli::store_result()mysqli_store_result()N/ATransfers a result set from the last query
mysqli::thread_id()mysqli_thread_id()N/AReturns the thread ID for the current connection
mysqli::thread_safe()mysqli_thread_safe()N/AReturns whether thread safety is given or not
mysqli::use_result()mysqli_use_result()N/AInitiate a result set retrieval
Summary of mysqli_stmt methods
MySQL_STMT
OOP InterfaceProcedural InterfaceAlias (Do not use)Description
Properties
$mysqli_stmt::affected_rowsmysqli_stmt_affected_rows()N/AReturns the total number of rows changed, deleted, or inserted by the last executed statement
$mysqli_stmt::errnomysqli_stmt_errno()N/AReturns the error code for the most recent statement call
$mysqli_stmt::errormysqli_stmt_error()N/AReturns a string description for last statement error
$mysqli_stmt::field_countmysqli_stmt_field_count()N/AReturns the number of field in the given statement - not documented
$mysqli_stmt::insert_idmysqli_stmt_insert_id()N/AGet the ID generated from the previous INSERT operation
$mysqli_stmt::num_rowsmysqli_stmt_num_rows()N/AReturn the number of rows in statements result set
$mysqli_stmt::param_countmysqli_stmt_param_count()N/AReturns the number of parameter for the given statement
$mysqli_stmt::sqlstatemysqli_stmt_sqlstate()N/AReturns SQLSTATE error from previous statement operation
Methods
mysqli_stmt::attr_get()mysqli_stmt_attr_get()N/AUsed to get the current value of a statement attribute
mysqli_stmt::attr_set()mysqli_stmt_attr_set()N/AUsed to modify the behavior of a prepared statement
mysqli_stmt::bind_param()mysqli_stmt_bind_param()N/ABinds variables to a prepared statement as parameters
mysqli_stmt::bind_result()mysqli_stmt_bind_result()N/ABinds variables to a prepared statement for result storage
mysqli_stmt::close()mysqli_stmt_close()N/ACloses a prepared statement
mysqli_stmt::data_seek()mysqli_stmt_data_seek()N/ASeeks to an arbitrary row in statement result set
mysqli_stmt::execute()mysqli_stmt_execute()mysqli_execute()Executes a prepared Query
mysqli_stmt::fetch()mysqli_stmt_fetch()N/AFetch results from a prepared statement into the bound variables
mysqli_stmt::free_result()mysqli_stmt_free_result()N/AFrees stored result memory for the given statement handle
mysqli_stmt::get_result()mysqli_stmt_get_result()N/AGets a result set from a prepared statement. Available only with mysqlnd.
mysqli_stmt::get_warnings()mysqli_stmt_get_warnings()N/ANOT DOCUMENTED
mysqli_stmt::more_results()mysqli_stmt_more_results()N/AChecks if there are more query results from a multiple query
mysqli_stmt::next_result()mysqli_stmt_next_result()N/AReads the next result from a multiple query
mysqli_stmt::num_rows()mysqli_stmt_num_rows()N/ASee also property $mysqli_stmt::num_rows
mysqli_stmt::prepare()mysqli_stmt_prepare()N/APrepare an SQL statement for execution
mysqli_stmt::reset()mysqli_stmt_reset()N/AResets a prepared statement
mysqli_stmt::result_metadata()mysqli_stmt_result_metadata()N/AReturns result set metadata from a prepared statement
mysqli_stmt::send_long_data()mysqli_stmt_send_long_data()N/ASend data in blocks
mysqli_stmt::store_result()mysqli_stmt_store_result()N/ATransfers a result set from a prepared statement
Summary of mysqli_result methods
mysqli_result
OOP InterfaceProcedural InterfaceAlias (Do not use)Description
Properties
$mysqli_result::current_fieldmysqli_field_tell()N/AGet current field offset of a result pointer
$mysqli_result::field_countmysqli_num_fields()N/AGet the number of fields in a result
$mysqli_result::lengthsmysqli_fetch_lengths()N/AReturns the lengths of the columns of the current row in the result set
$mysqli_result::num_rowsmysqli_num_rows()N/AGets the number of rows in a result
Methods
mysqli_result::data_seek()mysqli_data_seek()N/AAdjusts the result pointer to an arbitrary row in the result
mysqli_result::fetch_all()mysqli_fetch_all()N/AFetches all result rows and returns the result set as an associative array, a numeric array, or both. Available only with mysqlnd.
mysqli_result::fetch_array()mysqli_fetch_array()N/AFetch a result row as an associative, a numeric array, or both
mysqli_result::fetch_assoc()mysqli_fetch_assoc()N/AFetch a result row as an associative array
mysqli_result::fetch_column()mysqli_fetch_column()N/AFetch a single column from the next row of a result set
mysqli_result::fetch_field_direct()mysqli_fetch_field_direct()N/AFetch meta-data for a single field
mysqli_result::fetch_field()mysqli_fetch_field()N/AReturns the next field in the result set
mysqli_result::fetch_fields()mysqli_fetch_fields()N/AReturns an array of objects representing the fields in a result set
mysqli_result::fetch_object()mysqli_fetch_object()N/AReturns the current row of a result set as an object
mysqli_result::fetch_row()mysqli_fetch_row()N/AGet a result row as an enumerated array
mysqli_result::field_seek()mysqli_field_seek()N/ASet result pointer to a specified field offset
mysqli_result::free(), mysqli_result::close, mysqli_result::free_resultmysqli_free_result()N/AFrees the memory associated with a result
Summary of mysqli_driver methods
MySQL_Driver
OOP InterfaceProcedural InterfaceAlias (Do not use)Description
Properties
$mysqli_driver::mysqli_reportmysqli_report()N/ASets mysqli error reporting mode
Methods
mysqli_driver::embedded_server_end()mysqli_embedded_server_end()N/ANOT DOCUMENTED
mysqli_driver::embedded_server_start()mysqli_embedded_server_start()N/ANOT DOCUMENTED

Note:

Alias functions are provided for backward compatibility purposes only. Do not use them in new projects.

To Top