mysqli::next_result
mysqli_next_result
(PHP 5, PHP 7, PHP 8)
mysqli::next_result -- mysqli_next_result — 为读取 multi_query 执行之后的下一个结果集做准备
说明
面向对象风格
过程化风格
mysqli_multi_query() 函数执行之后,为读取下一个结果集做准备,然后可以使用 mysqli_store_result() 或 mysqli_use_result() 检索。
返回值
成功时返回 true, 或者在失败时返回 false。如果下一条语句导致错误,也返回 false,这跟 mysqli_more_results() 不同。
错误/异常
If mysqli error reporting is enabled (MYSQLI_REPORT_ERROR) and the requested operation fails,
a warning is generated. If, in addition, the mode is set to MYSQLI_REPORT_STRICT,
a mysqli_sql_exception is thrown instead.
示例
参见
- mysqli_multi_query() - 在数据库上执行一个或多个查询
- mysqli_more_results() - 检查批量查询中是否还有查询结果
- mysqli_store_result() - 传输上次查询的结果集
- mysqli_use_result() - Initiate a result set retrieval