? Character sets
簡介 ?
Bejson.com
PHP Manual
MySQL
MySQL增強(qiáng)版擴(kuò)展
MySQL增強(qiáng)版擴(kuò)展
簡介
Overview
Quick start guide
Dual procedural and object-oriented interface
Connections
Executing statements
Prepared Statements
Stored Procedures
Multiple Statements
API support for transactions
Metadata
安裝/配置
需求
安裝
運行時配置
資源類型
mysqli 擴(kuò)展和持久化連接
預(yù)定義常量
Notes
MySQLi 擴(kuò)展的功能概述
MySQLi
— MySQLi類
mysqli::$affected_rows
— Gets the number of affected rows in a previous MySQL operation
mysqli::autocommit
— 打開或關(guān)閉本次數(shù)據(jù)庫連接的自動命令提交事務(wù)模式
mysqli::begin_transaction
— Starts a transaction
mysqli::change_user
— Changes the user of the specified database connection
mysqli::character_set_name
— 返回當(dāng)前數(shù)據(jù)庫連接的默認(rèn)字符編碼
mysqli::close
— 關(guān)閉先前打開的數(shù)據(jù)庫連接
mysqli::commit
— 提交一個事務(wù)
mysqli::$connect_errno
— Returns the error code from last connect call
mysqli::$connect_error
— Returns a description of the last connection error
mysqli::__construct
— Open a new connection to the MySQL server
mysqli::debug
— Performs debugging operations
mysqli::dump_debug_info
— 將調(diào)試信息輸出到日志
mysqli::errno
— 返回最近函數(shù)調(diào)用的錯誤代碼
mysqli::$error_list
— Returns a list of errors from the last command executed
mysqli::$error
— Returns a string description of the last error
mysqli::$field_count
— Returns the number of columns for the most recent query
mysqli::get_charset
— Returns a character set object
mysqli::$client_info
— 獲取 MySQL 客戶端信息
mysqli_get_client_version
— 作為一個整數(shù)返回MySQL客戶端的版本
mysqli::get_connection_stats
— 返回客戶端連接的統(tǒng)計數(shù)據(jù)
mysqli::$host_info
— 返回一個表述使用的連接類型的字符串
mysqli::$protocol_version
— 返回MySQL使用的協(xié)議版本號
mysqli::$server_info
— 返回MySQL服務(wù)器的版本號
mysqli::$server_version
— 作為一個整數(shù)返回MySQL服務(wù)器的版本
mysqli::get_warnings
— Get result of SHOW WARNINGS
mysqli::$info
— 返回最近執(zhí)行的 SQL 語句的信息
mysqli::init
— 初始化 MySQLi 并返回一個資源類型的值,這個值可以作為 mysqli_real_connect() 函數(shù)的傳入?yún)?shù)
mysqli::$insert_id
— 返回最后一條插入語句產(chǎn)生的自增 ID
mysqli::kill
— 讓服務(wù)器殺掉一個 MySQL 線程
mysqli::more_results
— 檢查批量查詢中是否還有查詢結(jié)果
mysqli::multi_query
— 執(zhí)行查詢
mysqli::next_result
— 為讀取 multi_query 執(zhí)行之后的下一個結(jié)果集做準(zhǔn)備
mysqli::options
— 設(shè)置選項
mysqli::ping
— ping 一個連接,或者如果連接處于斷開狀態(tài),重新連接
mysqli::poll
— 輪詢連接
mysqli::prepare
— 準(zhǔn)備執(zhí)行一個 SQL 語句
mysqli::query
— 對數(shù)據(jù)庫執(zhí)行一次查詢
mysqli::real_connect
— 建立一個 MySQL 服務(wù)器連接
mysqli::real_escape_string
— 根據(jù)當(dāng)前連接的字符集,對于 SQL 語句中的特殊字符進(jìn)行轉(zhuǎn)義
mysqli::real_query
— 執(zhí)行一個mysql查詢
mysqli::reap_async_query
— 獲取異步查詢的結(jié)果
mysqli::refresh
— 刷新
mysqli::release_savepoint
— 從當(dāng)前事務(wù)的保存點中移除一個命名保存點
mysqli::rollback
— 回退當(dāng)前事務(wù)
mysqli::savepoint
— 在當(dāng)前事務(wù)中增加一個命名保存點
mysqli::select_db
— 選擇用于數(shù)據(jù)庫查詢的默認(rèn)數(shù)據(jù)庫
mysqli::set_charset
— 設(shè)置默認(rèn)字符編碼
mysqli::$sqlstate
— 返回上一次 SQL 操作的 SQLSTATE 錯誤信息
mysqli::ssl_set
— 使用 SSL 建立到數(shù)據(jù)庫之間的安全連接
mysqli::stat
— 獲取當(dāng)前系統(tǒng)狀態(tài)信息
mysqli::stmt_init
— 初始化一條語句并返回一個用于mysqli_stmt_prepare(調(diào)用)的對象
mysqli::store_result
— 轉(zhuǎn)移上一次查詢返回的結(jié)果集
mysqli::$thread_id
— 返回當(dāng)前連接的線程 ID
mysqli::thread_safe
— 返回是否是線程安全的
mysqli::use_result
— Initiate a result set retrieval
mysqli::$warning_count
— Returns the number of warnings from the last query for the given link
MySQLi_STMT
— MySQLi_STMT類
mysqli_stmt::$affected_rows
— Returns the total number of rows changed, deleted, inserted, or matched by the last statement executed
mysqli_stmt::attr_get
— Used to get the current value of a statement attribute
mysqli_stmt::attr_set
— Used to modify the behavior of a prepared statement
mysqli_stmt::bind_param
— Binds variables to a prepared statement as parameters
mysqli_stmt::bind_result
— Binds variables to a prepared statement for result storage
mysqli_stmt::close
— Closes a prepared statement
mysqli_stmt::__construct
— Constructs a new mysqli_stmt object
mysqli_stmt::data_seek
— Seeks to an arbitrary row in statement result set
mysqli_stmt::$errno
— Returns the error code for the most recent statement call
mysqli_stmt::$error_list
— Returns a list of errors from the last statement executed
mysqli_stmt::$error
— Returns a string description for last statement error
mysqli_stmt::execute
— Executes a prepared statement
mysqli_stmt::fetch
— Fetch results from a prepared statement into the bound variables
mysqli_stmt::$field_count
— Returns the number of columns in the given statement
mysqli_stmt::free_result
— Frees stored result memory for the given statement handle
mysqli_stmt::get_result
— Gets a result set from a prepared statement as a mysqli_result object
mysqli_stmt::get_warnings
— Get result of SHOW WARNINGS
mysqli_stmt::$insert_id
— Get the ID generated from the previous INSERT operation
mysqli_stmt::more_results
— Check if there are more query results from a multiple query
mysqli_stmt::next_result
— Reads the next result from a multiple query
mysqli_stmt::$num_rows
— Returns the number of rows fetched from the server
mysqli_stmt::$param_count
— Returns the number of parameters for the given statement
mysqli_stmt::prepare
— Prepares an SQL statement for execution
mysqli_stmt::reset
— Resets a prepared statement
mysqli_stmt::result_metadata
— Returns result set metadata from a prepared statement
mysqli_stmt::send_long_data
— Send data in blocks
mysqli_stmt::$sqlstate
— Returns SQLSTATE error from previous statement operation
mysqli_stmt::store_result
— Stores a result set in an internal buffer
mysqli_result
— mysqli_result類
mysqli_result::__construct
— Constructs a mysqli_result object
mysqli_result::$current_field
— Get current field offset of a result pointer
mysqli_result::data_seek
— Adjusts the result pointer to an arbitrary row in the result
mysqli_result::fetch_all
— Fetch all result rows as an associative array, a numeric array, or both
mysqli_result::fetch_array
— Fetch the next row of a result set as an associative, a numeric array, or both
mysqli_result::fetch_assoc
— Fetch the next row of a result set as an associative array
mysqli_result::fetch_column
— Fetch a single column from the next row of a result set
mysqli_result::fetch_field_direct
— Fetch meta-data for a single field
mysqli_result::fetch_field
— Returns the next field in the result set
mysqli_result::fetch_fields
— Returns an array of objects representing the fields in a result set
mysqli_result::fetch_object
— Fetch the next row of a result set as an object
mysqli_result::fetch_row
— Fetch the next row of a result set as an enumerated array
mysqli_result::$field_count
— Gets the number of fields in the result set
mysqli_result::field_seek
— Set result pointer to a specified field offset
mysqli_result::free
— Frees the memory associated with a result
mysqli_result::getIterator
— Retrieve an external iterator
mysqli_result::$lengths
— Returns the lengths of the columns of the current row in the result set
mysqli_result::$num_rows
— Gets the number of rows in the result set
MySQLi_Driver
— MySQLi_Driver類
mysqli_driver::embedded_server_end
— Stop embedded server
mysqli_driver::embedded_server_start
— Initialize and start embedded server
mysqli_driver::$report_mode
— Sets mysqli error reporting mode
MySQLi_Warning
— MySQLi_Warning類
mysqli_warning::__construct
— Private constructor to disallow direct instantiation
mysqli_warning::next
— Fetch next warning
mysqli_sql_exception
— mysqli異常類
別名和過時的 Mysqli 函數(shù)
mysqli_connect
— 別名 mysqli::__construct
mysqli_escape_string
— 別名 mysqli_real_escape_string
mysqli_execute
— mysqli_stmt_execute 的別名
mysqli_get_client_stats
— 返回客戶端進(jìn)程統(tǒng)計信息
mysqli_get_links_stats
— 返回打開和緩存的鏈接相關(guān)信息
mysqli_report
— 別名 mysqli_driver->report_mode
mysqli::set_opt
— Alias of mysqli_options