略微加速
PHP官方手册 - 互联网笔记
首页
IT
PHP手册
Elasticsearch
SVN手册
互联网
博客
登陆
注册
PHP - Manual: MySQLi
2025-03-31
简介 »
« Character sets
PHP 手册
函数参考
数据库扩展
针对各数据库系统对应的扩展
MySQL
MySQL增强版扩展
简介
概述
快速入门指南
面向过程和面向对象,两种接口
Connections
Executing statements
Prepared Statements
Stored Procedures
Multiple Statements
API support for transactions
Metadata
安装/配置
需求
安装
运行时配置
mysqli 扩展和持久化连接
预定义常量
Notes
MySQLi 扩展的函数概述
mysqli
— mysqli 类
mysqli::$affected_rows
— Gets the number of affected rows in a previous MySQL operation
mysqli::autocommit
— 打开或关闭本次数据库连接的自动命令提交事务模式
mysqli::begin_transaction
— Starts a transaction
mysqli::change_user
— Changes the user of the database connection
mysqli::character_set_name
— 返回当前数据库连接的字符编码
mysqli::close
— 关闭先前打开的数据库连接
mysqli::commit
— 提交当前事务
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
— 将调试信息输出到日志
mysqli::$errno
— 返回最近函数调用的错误代码
mysqli::$error
— Returns a string description of the last error
mysqli::$error_list
— Returns a list of errors from the last command executed
mysqli::execute_query
— Prepares, binds parameters, and executes SQL statement
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::$client_version
— 作为整数返回 MySQL 客户端的版本
mysqli::get_connection_stats
— 返回客户端连接的统计数据
mysqli::$host_info
— 返回表述使用的连接类型的字符串
mysqli::$protocol_version
— 返回 MySQL 协议使用的版本号
mysqli::$server_info
— 返回 MySQL 服务器的版本号
mysqli::$server_version
— 作为一个整数返回MySQL服务器的版本
mysqli::get_warnings
— Get result of SHOW WARNINGS
mysqli::$info
— 返回最近执行的 SQL 语句的信息
mysqli::init
— 初始化 MySQLi 并返回用于 mysqli_real_connect() 的对象
mysqli::$insert_id
— 返回上次查询为 AUTO_INCREMENT 列生成的值
mysqli::kill
— 让服务器杀死一个 MySQL 线程
mysqli::more_results
— 检查批量查询中是否还有查询结果
mysqli::multi_query
— 在数据库上执行一个或多个查询
mysqli::next_result
— 为读取 multi_query 执行之后的下一个结果集做准备
mysqli::options
— 设置选项
mysqli::ping
— ping 一个连接,或者如果连接处于断开状态,重新连接
mysqli::poll
— 轮询连接
mysqli::prepare
— 预处理执行 SQL
mysqli::query
— 对数据库执行查询
mysqli::real_connect
— 建立一个 MySQL 服务器连接
mysqli::real_escape_string
— 根据当前连接的字符集,对于 SQL 语句中的特殊字符进行转义
mysqli::real_query
— 执行一个mysql查询
mysqli::reap_async_query
— 获取异步查询的结果
mysqli::refresh
— 刷新
mysqli::release_savepoint
— 从当前事务的保存点中移除一个命名保存点
mysqli::rollback
— 回滚当前事务
mysqli::savepoint
— 在当前事务中设置命名保存点
mysqli::select_db
— 选择用于数据库查询的默认数据库
mysqli::set_charset
— 设置客户端字符集
mysqli::$sqlstate
— 返回上一次 MySQL 操作的 SQLSTATE 错误
mysqli::ssl_set
— 用于使用 SSL 建立安全连接
mysqli::stat
— 获取当前系统状态信息
mysqli::stmt_init
— 初始化语句并返回用于 mysqli_stmt_prepare(调用)的对象
mysqli::store_result
— 传输上次查询的结果集
mysqli::$thread_id
— 返回当前连接的线程 ID
mysqli::thread_safe
— 返回是否线程安全
mysqli::use_result
— Initiate a result set retrieval
mysqli::$warning_count
— Returns the number of warnings generated by the most recently executed query
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
— Adjusts the result pointer to an arbitrary row in the buffered result
mysqli_stmt::$errno
— Returns the error code for the most recent statement call
mysqli_stmt::$error
— Returns a string description for last statement error
mysqli_stmt::$error_list
— Returns a list of errors from the last statement executed
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
— Returns the next field in the result set
mysqli_result::fetch_field_direct
— Fetch meta-data for a single field
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_sql_exception 类
mysqli_sql_exception::getSqlState
— Returns the SQLSTATE error code
别名和过时的 Mysqli 函数
mysqli_connect
— 别名 mysqli::__construct
mysqli::escape_string
— 别名 mysqli_real_escape_string
mysqli_execute
— 别名 mysqli_stmt_execute
mysqli_get_client_stats
— 返回客户端进程统计信息
mysqli_get_links_stats
— 返回打开和缓存的链接相关信息
mysqli_report
— 别名 mysqli_driver->report_mode
mysqli::set_opt
— 别名 mysqli_options
更新日志
发现了问题?
了解如何改进此页面
•
提交拉取请求
•
报告一个错误
+
添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
官方地址:
https://www.php.net/manual/en/book.mysqli.php
有任何技术问题请点击这里
网站运营推广招聘
IT
PHP
编程语言
开发编程
Linux
科技
Elasticsearch
HTML/CSS/XML
面试
数据库
网络
JAVA
NoSQL
C/C++
Golang
Git
算法
操作系统
正则表达式
Redis
互联网
MySql
JavaScript
运维
软件
国际
架构设计
Mac OS
TCP/IP
Excel
Windows
Vim
Socket
Oracle
VR
MongoDB
Python
运营
MemCache
商业
硬件
电子
娱乐
设计
nginx
摄影
游戏
WordPress
HTTP
团建
数码电器
Docker
广告
广告
laravel查看orm生成的sql
PHPStorm ESC 会退出命令行
laravel orm中DB::insert方法导致内存泄漏的问题解决方法
docker-compose启动nginx与php-fpm
composer install参数
php7 安装fileinfo扩展
php位值,解决 PHP 中 usort 在值相同时改变原始位置的问题
preg_split — 通过一个正则表达式分隔字符串
[PHP] inet_pton/inet_ntop IP地址转换函数
Composer的Packagist资源
[鸟哥]PHP_INT_MIN 和 -9223372036854775808
PHP json解析(json_decode)页面工具
opcache预加载
mysql面试题
PHP 8.1
ADORecordSet对象
支持php7的性能采集扩展
常用的php ADODB使用方法集锦
php上周一、本周一、下周一日期
adodb手册
联系我们
半月雨文化
可降解耗材网
蓝云环保
78免费小説
上海网站seo优化
工程造价
币安app官网下载
币安app官网下载
coinbase
贷款信息
seo查询
北京半月雨文化科技有限公司
.版权所有
京ICP备12026184号-3