Chapter 3 MySQL Improved Extension

Table of Contents

3.1 Examples
3.2 Overview
3.3 Quick start guide
3.3.1 Dual procedural and object-oriented interface
3.3.2 Connections
3.3.3 Executing statements
3.3.4 Prepared Statements
3.3.5 Stored Procedures
3.3.6 Multiple Statements
3.3.7 API support for transactions
3.3.8 Metadata
3.4 Installing/Configuring
3.4.1 Requirements
3.4.2 Installation
3.4.3 Runtime Configuration
3.4.4 Resource Types
3.5 The mysqli Extension and Persistent Connections
3.6 Predefined Constants
3.7 Notes
3.8 The MySQLi Extension Function Summary
3.9 The mysqli class
3.9.1 mysqli::$affected_rows, mysqli_affected_rows
3.9.2 mysqli::autocommit, mysqli_autocommit
3.9.3 mysqli::begin_transaction, mysqli_begin_transaction
3.9.4 mysqli::change_user, mysqli_change_user
3.9.5 mysqli::character_set_name, mysqli_character_set_name
3.9.6 mysqli::$client_info, mysqli_get_client_info
3.9.7 mysqli::$client_version, mysqli_get_client_version
3.9.8 mysqli::close, mysqli_close
3.9.9 mysqli::commit, mysqli_commit
3.9.10 mysqli::$connect_errno, mysqli_connect_errno
3.9.11 mysqli::$connect_error, mysqli_connect_error
3.9.12 mysqli::__construct, mysqli_connect
3.9.13 mysqli::debug, mysqli_debug
3.9.14 mysqli::dump_debug_info, mysqli_dump_debug_info
3.9.15 mysqli::$errno, mysqli_errno
3.9.16 mysqli::$error_list, mysqli_error_list
3.9.17 mysqli::$error, mysqli_error
3.9.18 mysqli::$field_count, mysqli_field_count
3.9.19 mysqli::get_charset, mysqli_get_charset
3.9.20 mysqli::get_client_info, mysqli_get_client_info
3.9.21 mysqli_get_client_stats
3.9.22 mysqli_get_client_version, mysqli::$client_version
3.9.23 mysqli::get_connection_stats, mysqli_get_connection_stats
3.9.24 mysqli::$host_info, mysqli_get_host_info
3.9.25 mysqli::$protocol_version, mysqli_get_proto_info
3.9.26 mysqli::$server_info, mysqli_get_server_info
3.9.27 mysqli::$server_version, mysqli_get_server_version
3.9.28 mysqli::get_warnings, mysqli_get_warnings
3.9.29 mysqli::$info, mysqli_info
3.9.30 mysqli::init, mysqli_init
3.9.31 mysqli::$insert_id, mysqli_insert_id
3.9.32 mysqli::kill, mysqli_kill
3.9.33 mysqli::more_results, mysqli_more_results
3.9.34 mysqli::multi_query, mysqli_multi_query
3.9.35 mysqli::next_result, mysqli_next_result
3.9.36 mysqli::options, mysqli_options
3.9.37 mysqli::ping, mysqli_ping
3.9.38 mysqli::poll, mysqli_poll
3.9.39 mysqli::prepare, mysqli_prepare
3.9.40 mysqli::query, mysqli_query
3.9.41 mysqli::real_connect, mysqli_real_connect
3.9.42 mysqli::real_escape_string, mysqli_real_escape_string
3.9.43 mysqli::real_query, mysqli_real_query
3.9.44 mysqli::reap_async_query, mysqli_reap_async_query
3.9.45 mysqli::refresh, mysqli_refresh
3.9.46 mysqli::release_savepoint, mysqli_release_savepoint
3.9.47 mysqli::rollback, mysqli_rollback
3.9.48 mysqli::rpl_query_type, mysqli_rpl_query_type
3.9.49 mysqli::savepoint, mysqli_savepoint
3.9.50 mysqli::select_db, mysqli_select_db
3.9.51 mysqli::send_query, mysqli_send_query
3.9.52 mysqli::set_charset, mysqli_set_charset
3.9.53 mysqli::set_local_infile_default, mysqli_set_local_infile_default
3.9.54 mysqli::set_local_infile_handler, mysqli_set_local_infile_handler
3.9.55 mysqli::$sqlstate, mysqli_sqlstate
3.9.56 mysqli::ssl_set, mysqli_ssl_set
3.9.57 mysqli::stat, mysqli_stat
3.9.58 mysqli::stmt_init, mysqli_stmt_init
3.9.59 mysqli::store_result, mysqli_store_result
3.9.60 mysqli::$thread_id, mysqli_thread_id
3.9.61 mysqli::thread_safe, mysqli_thread_safe
3.9.62 mysqli::use_result, mysqli_use_result
3.9.63 mysqli::$warning_count, mysqli_warning_count
3.10 The mysqli_stmt class
3.10.1 mysqli_stmt::$affected_rows, mysqli_stmt_affected_rows
3.10.2 mysqli_stmt::attr_get, mysqli_stmt_attr_get
3.10.3 mysqli_stmt::attr_set, mysqli_stmt_attr_set
3.10.4 mysqli_stmt::bind_param, mysqli_stmt_bind_param
3.10.5 mysqli_stmt::bind_result, mysqli_stmt_bind_result
3.10.6 mysqli_stmt::close, mysqli_stmt_close
3.10.7 mysqli_stmt::data_seek, mysqli_stmt_data_seek
3.10.8 mysqli_stmt::$errno, mysqli_stmt_errno
3.10.9 mysqli_stmt::$error_list, mysqli_stmt_error_list
3.10.10 mysqli_stmt::$error, mysqli_stmt_error
3.10.11 mysqli_stmt::execute, mysqli_stmt_execute
3.10.12 mysqli_stmt::fetch, mysqli_stmt_fetch
3.10.13 mysqli_stmt::$field_count, mysqli_stmt_field_count
3.10.14 mysqli_stmt::free_result, mysqli_stmt_free_result
3.10.15 mysqli_stmt::get_result, mysqli_stmt_get_result
3.10.16 mysqli_stmt::get_warnings, mysqli_stmt_get_warnings
3.10.17 mysqli_stmt::$insert_id, mysqli_stmt_insert_id
3.10.18 mysqli_stmt::more_results, mysqli_stmt_more_results
3.10.19 mysqli_stmt::next_result, mysqli_stmt_next_result
3.10.20 mysqli_stmt::$num_rows, mysqli_stmt_num_rows
3.10.21 mysqli_stmt::$param_count, mysqli_stmt_param_count
3.10.22 mysqli_stmt::prepare, mysqli_stmt_prepare
3.10.23 mysqli_stmt::reset, mysqli_stmt_reset
3.10.24 mysqli_stmt::result_metadata, mysqli_stmt_result_metadata
3.10.25 mysqli_stmt::send_long_data, mysqli_stmt_send_long_data
3.10.26 mysqli_stmt::$sqlstate, mysqli_stmt_sqlstate
3.10.27 mysqli_stmt::store_result, mysqli_stmt_store_result
3.11 The mysqli_result class
3.11.1 mysqli_result::$current_field, mysqli_field_tell
3.11.2 mysqli_result::data_seek, mysqli_data_seek
3.11.3 mysqli_result::fetch_all, mysqli_fetch_all
3.11.4 mysqli_result::fetch_array, mysqli_fetch_array
3.11.5 mysqli_result::fetch_assoc, mysqli_fetch_assoc
3.11.6 mysqli_result::fetch_field_direct, mysqli_fetch_field_direct
3.11.7 mysqli_result::fetch_field, mysqli_fetch_field
3.11.8 mysqli_result::fetch_fields, mysqli_fetch_fields
3.11.9 mysqli_result::fetch_object, mysqli_fetch_object
3.11.10 mysqli_result::fetch_row, mysqli_fetch_row
3.11.11 mysqli_result::$field_count, mysqli_num_fields
3.11.12 mysqli_result::field_seek, mysqli_field_seek
3.11.13 mysqli_result::free, mysqli_free_result
3.11.14 mysqli_result::$lengths, mysqli_fetch_lengths
3.11.15 mysqli_result::$num_rows, mysqli_num_rows
3.12 The mysqli_driver class
3.12.1 mysqli_driver::embedded_server_end, mysqli_embedded_server_end
3.12.2 mysqli_driver::embedded_server_start, mysqli_embedded_server_start
3.12.3 mysqli_driver::$report_mode, mysqli_report
3.13 The mysqli_warning class
3.13.1 mysqli_warning::__construct
3.13.2 mysqli_warning::next
3.14 The mysqli_sql_exception class
3.15 Aliases and deprecated Mysqli Functions
3.15.1 mysqli_bind_param
3.15.2 mysqli_bind_result
3.15.3 mysqli_client_encoding
3.15.4 mysqli_connect
3.15.5 mysqli::disable_reads_from_master, mysqli_disable_reads_from_master
3.15.6 mysqli_disable_rpl_parse
3.15.7 mysqli_enable_reads_from_master
3.15.8 mysqli_enable_rpl_parse
3.15.9 mysqli_escape_string
3.15.10 mysqli_execute
3.15.11 mysqli_fetch
3.15.12 mysqli_get_cache_stats
3.15.13 mysqli_get_links_stats
3.15.14 mysqli_get_metadata
3.15.15 mysqli_master_query
3.15.16 mysqli_param_count
3.15.17 mysqli_report
3.15.18 mysqli_rpl_parse_enabled
3.15.19 mysqli_rpl_probe
3.15.20 mysqli_send_long_data
3.15.21 mysqli::set_opt, mysqli_set_opt
3.15.22 mysqli_slave_query
3.16 Changelog

Copyright 1997-2014 the PHP Documentation Group.

The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above. More information about the MySQL Database server can be found at http://www.mysql.com/

An overview of software available for using MySQL from PHP can be found at Section 3.2, “Overview”

Documentation for MySQL can be found at http://dev.mysql.com/doc/.

Parts of this documentation included from MySQL manual with permissions of Oracle Corporation.