PDF (US Ltr)
- 2.4Mb
PDF (A4)
- 2.4Mb
HTML Download (TGZ)
- 251.4Kb
HTML Download (Zip)
- 258.9Kb
Abstract
This manual describes the PHP extensions and interfaces that can be used with MySQL.
For legal information, see the Legal Notices.
For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users.
Document generated on: 2021-04-16 (revision: 69414)
Table of Contents
- Preface and Legal Notices
- 1 Introduction to the MySQL PHP API
- 2 Overview of the MySQL PHP drivers
- 3 MySQL Improved Extension
- 3.1 Overview
- 3.2 Quick start guide
- 3.3 Installing/Configuring
- 3.4 The mysqli Extension and Persistent Connections
- 3.5 Predefined Constants
- 3.6 Notes
- 3.7 The MySQLi Extension Function Summary
- 3.8 The mysqli class
- 3.8.1
mysqli::$affected_rows
,mysqli_affected_rows
- 3.8.2
mysqli::autocommit
,mysqli_autocommit
- 3.8.3
mysqli::begin_transaction
,mysqli_begin_transaction
- 3.8.4
mysqli::change_user
,mysqli_change_user
- 3.8.5
mysqli::character_set_name
,mysqli_character_set_name
- 3.8.6
mysqli::close
,mysqli_close
- 3.8.7
mysqli::commit
,mysqli_commit
- 3.8.8
mysqli::$connect_errno
,mysqli_connect_errno
- 3.8.9
mysqli::$connect_error
,mysqli_connect_error
- 3.8.10
mysqli::__construct
,mysqli::connect
,mysqli_connect
- 3.8.11
mysqli::debug
,mysqli_debug
- 3.8.12
mysqli::dump_debug_info
,mysqli_dump_debug_info
- 3.8.13
mysqli::$errno
,mysqli_errno
- 3.8.14
mysqli::$error_list
,mysqli_error_list
- 3.8.15
mysqli::$error
,mysqli_error
- 3.8.16
mysqli::$field_count
,mysqli_field_count
- 3.8.17
mysqli::get_charset
,mysqli_get_charset
- 3.8.18
mysqli::$client_info
,mysqli::get_client_info
,mysqli_get_client_info
- 3.8.19
mysqli::$client_version
,mysqli_get_client_version
- 3.8.20
mysqli::get_connection_stats
,mysqli_get_connection_stats
- 3.8.21
mysqli::$host_info
,mysqli_get_host_info
- 3.8.22
mysqli::$protocol_version
,mysqli_get_proto_info
- 3.8.23
mysqli::$server_info
,mysqli::get_server_info
,mysqli_get_server_info
- 3.8.24
mysqli::$server_version
,mysqli_get_server_version
- 3.8.25
mysqli::get_warnings
,mysqli_get_warnings
- 3.8.26
mysqli::$info
,mysqli_info
- 3.8.27
mysqli::init
,mysqli_init
- 3.8.28
mysqli::$insert_id
,mysqli_insert_id
- 3.8.29
mysqli::kill
,mysqli_kill
- 3.8.30
mysqli::more_results
,mysqli_more_results
- 3.8.31
mysqli::multi_query
,mysqli_multi_query
- 3.8.32
mysqli::next_result
,mysqli_next_result
- 3.8.33
mysqli::options
,mysqli_options
- 3.8.34
mysqli::ping
,mysqli_ping
- 3.8.35
mysqli::poll
,mysqli_poll
- 3.8.36
mysqli::prepare
,mysqli_prepare
- 3.8.37
mysqli::query
,mysqli_query
- 3.8.38
mysqli::real_connect
,mysqli_real_connect
- 3.8.39
mysqli::real_escape_string
,mysqli_real_escape_string
- 3.8.40
mysqli::real_query
,mysqli_real_query
- 3.8.41
mysqli::reap_async_query
,mysqli_reap_async_query
- 3.8.42
mysqli::refresh
,mysqli_refresh
- 3.8.43
mysqli::release_savepoint
,mysqli_release_savepoint
- 3.8.44
mysqli::rollback
,mysqli_rollback
- 3.8.45
mysqli::savepoint
,mysqli_savepoint
- 3.8.46
mysqli::select_db
,mysqli_select_db
- 3.8.47
mysqli::set_charset
,mysqli_set_charset
- 3.8.48
mysqli::$sqlstate
,mysqli_sqlstate
- 3.8.49
mysqli::ssl_set
,mysqli_ssl_set
- 3.8.50
mysqli::stat
,mysqli_stat
- 3.8.51
mysqli::stmt_init
,mysqli_stmt_init
- 3.8.52
mysqli::store_result
,mysqli_store_result
- 3.8.53
mysqli::$thread_id
,mysqli_thread_id
- 3.8.54
mysqli::thread_safe
,mysqli_thread_safe
- 3.8.55
mysqli::use_result
,mysqli_use_result
- 3.8.56
mysqli::$warning_count
,mysqli_warning_count
- 3.8.1
- 3.9 The mysqli_stmt class
- 3.9.1
mysqli_stmt::$affected_rows
,mysqli_stmt_affected_rows
- 3.9.2
mysqli_stmt::attr_get
,mysqli_stmt_attr_get
- 3.9.3
mysqli_stmt::attr_set
,mysqli_stmt_attr_set
- 3.9.4
mysqli_stmt::bind_param
,mysqli_stmt_bind_param
- 3.9.5
mysqli_stmt::bind_result
,mysqli_stmt_bind_result
- 3.9.6
mysqli_stmt::close
,mysqli_stmt_close
- 3.9.7
mysqli_stmt::__construct
- 3.9.8
mysqli_stmt::data_seek
,mysqli_stmt_data_seek
- 3.9.9
mysqli_stmt::$errno
,mysqli_stmt_errno
- 3.9.10
mysqli_stmt::$error_list
,mysqli_stmt_error_list
- 3.9.11
mysqli_stmt::$error
,mysqli_stmt_error
- 3.9.12
mysqli_stmt::execute
,mysqli_stmt_execute
- 3.9.13
mysqli_stmt::fetch
,mysqli_stmt_fetch
- 3.9.14
mysqli_stmt::$field_count
,mysqli_stmt_field_count
- 3.9.15
mysqli_stmt::free_result
,mysqli_stmt_free_result
- 3.9.16
mysqli_stmt::get_result
,mysqli_stmt_get_result
- 3.9.17
mysqli_stmt::get_warnings
,mysqli_stmt_get_warnings
- 3.9.18
mysqli_stmt::$insert_id
,mysqli_stmt_insert_id
- 3.9.19
mysqli_stmt::more_results
,mysqli_stmt_more_results
- 3.9.20
mysqli_stmt::next_result
,mysqli_stmt_next_result
- 3.9.21
mysqli_stmt::$num_rows
,mysqli_stmt::num_rows
,mysqli_stmt_num_rows
- 3.9.22
mysqli_stmt::$param_count
,mysqli_stmt_param_count
- 3.9.23
mysqli_stmt::prepare
,mysqli_stmt_prepare
- 3.9.24
mysqli_stmt::reset
,mysqli_stmt_reset
- 3.9.25
mysqli_stmt::result_metadata
,mysqli_stmt_result_metadata
- 3.9.26
mysqli_stmt::send_long_data
,mysqli_stmt_send_long_data
- 3.9.27
mysqli_stmt::$sqlstate
,mysqli_stmt_sqlstate
- 3.9.28
mysqli_stmt::store_result
,mysqli_stmt_store_result
- 3.9.1
- 3.10 The mysqli_result class
- 3.10.1
mysqli_result::$current_field
,mysqli_field_tell
- 3.10.2
mysqli_result::data_seek
,mysqli_data_seek
- 3.10.3
mysqli_result::fetch_all
,mysqli_fetch_all
- 3.10.4
mysqli_result::fetch_array
,mysqli_fetch_array
- 3.10.5
mysqli_result::fetch_assoc
,mysqli_fetch_assoc
- 3.10.6
mysqli_result::fetch_field_direct
,mysqli_fetch_field_direct
- 3.10.7
mysqli_result::fetch_field
,mysqli_fetch_field
- 3.10.8
mysqli_result::fetch_fields
,mysqli_fetch_fields
- 3.10.9
mysqli_result::fetch_object
,mysqli_fetch_object
- 3.10.10
mysqli_result::fetch_row
,mysqli_fetch_row
- 3.10.11
mysqli_result::$field_count
,mysqli_num_fields
- 3.10.12
mysqli_result::field_seek
,mysqli_field_seek
- 3.10.13
mysqli_result::free
,mysqli_result::close
,mysqli_result::free_result
,mysqli_free_result
- 3.10.14
mysqli_result::$lengths
,mysqli_fetch_lengths
- 3.10.15
mysqli_result::$num_rows
,mysqli_num_rows
- 3.10.1
- 3.11 The mysqli_driver class
- 3.12 The mysqli_warning class
- 3.13 The mysqli_sql_exception class
- 3.14 Aliases and deprecated Mysqli Functions
- 3.15 Changelog
- 4 MySQL Functions (PDO_MYSQL)
- 5 Mysql_xdevapi
- 5.1 Installing/Configuring
- 5.2 Predefined Constants
- 5.3 Examples
- 5.4 Mysql_xdevapi Functions
- 5.5 BaseResult interface
- 5.6 Client class
- 5.7 Collection class
- 5.7.1
Collection::add
- 5.7.2
Collection::addOrReplaceOne
- 5.7.3
Collection::__construct
- 5.7.4
Collection::count
- 5.7.5
Collection::createIndex
- 5.7.6
Collection::dropIndex
- 5.7.7
Collection::existsInDatabase
- 5.7.8
Collection::find
- 5.7.9
Collection::getName
- 5.7.10
Collection::getOne
- 5.7.11
Collection::getSchema
- 5.7.12
Collection::getSession
- 5.7.13
Collection::modify
- 5.7.14
Collection::remove
- 5.7.15
Collection::removeOne
- 5.7.16
Collection::replaceOne
- 5.7.1
- 5.8 CollectionAdd class
- 5.9 CollectionFind class
- 5.9.1
CollectionFind::bind
- 5.9.2
CollectionFind::__construct
- 5.9.3
CollectionFind::execute
- 5.9.4
CollectionFind::fields
- 5.9.5
CollectionFind::groupBy
- 5.9.6
CollectionFind::having
- 5.9.7
CollectionFind::limit
- 5.9.8
CollectionFind::lockExclusive
- 5.9.9
CollectionFind::lockShared
- 5.9.10
CollectionFind::offset
- 5.9.11
CollectionFind::sort
- 5.9.1
- 5.10 CollectionModify class
- 5.10.1
CollectionModify::arrayAppend
- 5.10.2
CollectionModify::arrayInsert
- 5.10.3
CollectionModify::bind
- 5.10.4
CollectionModify::__construct
- 5.10.5
CollectionModify::execute
- 5.10.6
CollectionModify::limit
- 5.10.7
CollectionModify::patch
- 5.10.8
CollectionModify::replace
- 5.10.9
CollectionModify::set
- 5.10.10
CollectionModify::skip
- 5.10.11
CollectionModify::sort
- 5.10.12
CollectionModify::unset
- 5.10.1
- 5.11 CollectionRemove class
- 5.12 ColumnResult class
- 5.12.1
ColumnResult::__construct
- 5.12.2
ColumnResult::getCharacterSetName
- 5.12.3
ColumnResult::getCollationName
- 5.12.4
ColumnResult::getColumnLabel
- 5.12.5
ColumnResult::getColumnName
- 5.12.6
ColumnResult::getFractionalDigits
- 5.12.7
ColumnResult::getLength
- 5.12.8
ColumnResult::getSchemaName
- 5.12.9
ColumnResult::getTableLabel
- 5.12.10
ColumnResult::getTableName
- 5.12.11
ColumnResult::getType
- 5.12.12
ColumnResult::isNumberSigned
- 5.12.13
ColumnResult::isPadded
- 5.12.1
- 5.13 CrudOperationBindable interface
- 5.14 CrudOperationLimitable interface
- 5.15 CrudOperationSkippable interface
- 5.16 CrudOperationSortable interface
- 5.17 DatabaseObject interface
- 5.18 DocResult class
- 5.19 Exception class
- 5.20 Executable interface
- 5.21 ExecutionStatus class
- 5.22 Expression class
- 5.23 Result class
- 5.24 RowResult class
- 5.25 Schema class
- 5.25.1
Schema::__construct
- 5.25.2
Schema::createCollection
- 5.25.3
Schema::dropCollection
- 5.25.4
Schema::existsInDatabase
- 5.25.5
Schema::getCollection
- 5.25.6
Schema::getCollectionAsTable
- 5.25.7
Schema::getCollections
- 5.25.8
Schema::getName
- 5.25.9
Schema::getSession
- 5.25.10
Schema::getTable
- 5.25.11
Schema::getTables
- 5.25.1
- 5.26 SchemaObject interface
- 5.27 Session class
- 5.27.1
Session::close
- 5.27.2
Session::commit
- 5.27.3
Session::__construct
- 5.27.4
Session::createSchema
- 5.27.5
Session::dropSchema
- 5.27.6
Session::generateUUID
- 5.27.7
Session::getDefaultSchema
- 5.27.8
Session::getSchema
- 5.27.9
Session::getSchemas
- 5.27.10
Session::getServerVersion
- 5.27.11
Session::listClients
- 5.27.12
Session::quoteName
- 5.27.13
Session::releaseSavepoint
- 5.27.14
Session::rollback
- 5.27.15
Session::rollbackTo
- 5.27.16
Session::setSavepoint
- 5.27.17
Session::sql
- 5.27.18
Session::startTransaction
- 5.27.1
- 5.28 SqlStatement class
- 5.29 SqlStatementResult class
- 5.29.1
SqlStatementResult::__construct
- 5.29.2
SqlStatementResult::fetchAll
- 5.29.3
SqlStatementResult::fetchOne
- 5.29.4
SqlStatementResult::getAffectedItemsCount
- 5.29.5
SqlStatementResult::getColumnsCount
- 5.29.6
SqlStatementResult::getColumnNames
- 5.29.7
SqlStatementResult::getColumns
- 5.29.8
SqlStatementResult::getGeneratedIds
- 5.29.9
SqlStatementResult::getLastInsertId
- 5.29.10
SqlStatementResult::getWarnings
- 5.29.11
SqlStatementResult::getWarningsCount
- 5.29.12
SqlStatementResult::hasData
- 5.29.13
SqlStatementResult::nextResult
- 5.29.1
- 5.30 Statement class
- 5.31 Table class
- 5.32 TableDelete class
- 5.33 TableInsert class
- 5.34 TableSelect class
- 5.34.1
TableSelect::bind
- 5.34.2
TableSelect::__construct
- 5.34.3
TableSelect::execute
- 5.34.4
TableSelect::groupBy
- 5.34.5
TableSelect::having
- 5.34.6
TableSelect::limit
- 5.34.7
TableSelect::lockExclusive
- 5.34.8
TableSelect::lockShared
- 5.34.9
TableSelect::offset
- 5.34.10
TableSelect::orderby
- 5.34.11
TableSelect::where
- 5.34.1
- 5.35 TableUpdate class
- 5.36 Warning class
- 6 Original MySQL API
- 6.1 Installing/Configuring
- 6.2 Changelog
- 6.3 Predefined Constants
- 6.4 Examples
- 6.5 MySQL Functions
- 6.5.1
mysql_affected_rows
- 6.5.2
mysql_client_encoding
- 6.5.3
mysql_close
- 6.5.4
mysql_connect
- 6.5.5
mysql_create_db
- 6.5.6
mysql_data_seek
- 6.5.7
mysql_db_name
- 6.5.8
mysql_db_query
- 6.5.9
mysql_drop_db
- 6.5.10
mysql_errno
- 6.5.11
mysql_error
- 6.5.12
mysql_escape_string
- 6.5.13
mysql_fetch_array
- 6.5.14
mysql_fetch_assoc
- 6.5.15
mysql_fetch_field
- 6.5.16
mysql_fetch_lengths
- 6.5.17
mysql_fetch_object
- 6.5.18
mysql_fetch_row
- 6.5.19
mysql_field_flags
- 6.5.20
mysql_field_len
- 6.5.21
mysql_field_name
- 6.5.22
mysql_field_seek
- 6.5.23
mysql_field_table
- 6.5.24
mysql_field_type
- 6.5.25
mysql_free_result
- 6.5.26
mysql_get_client_info
- 6.5.27
mysql_get_host_info
- 6.5.28
mysql_get_proto_info
- 6.5.29
mysql_get_server_info
- 6.5.30
mysql_info
- 6.5.31
mysql_insert_id
- 6.5.32
mysql_list_dbs
- 6.5.33
mysql_list_fields
- 6.5.34
mysql_list_processes
- 6.5.35
mysql_list_tables
- 6.5.36
mysql_num_fields
- 6.5.37
mysql_num_rows
- 6.5.38
mysql_pconnect
- 6.5.39
mysql_ping
- 6.5.40
mysql_query
- 6.5.41
mysql_real_escape_string
- 6.5.42
mysql_result
- 6.5.43
mysql_select_db
- 6.5.44
mysql_set_charset
- 6.5.45
mysql_stat
- 6.5.46
mysql_tablename
- 6.5.47
mysql_thread_id
- 6.5.48
mysql_unbuffered_query
- 6.5.1
- 7 MySQL Native Driver
- 8 Common Problems with MySQL and PHP