|
PHP5中文手册
db2_next_result(PECL ibm_db2:1.0-1.6.2) db2_next_result — Requests the next result set from a stored procedure 说明
resource db2_next_result
( resource $stmt
)
A stored procedure can return zero or more result sets. While you handle the first result set in exactly the same way you would handle the results returned by a simple SELECT statement, to fetch the second and subsequent result sets from a stored procedure you must call the db2_next_result() function and return the result to a uniquely named PHP variable. 返回值Returns a new statement resource containing the next result set if the stored procedure returned another result set. Returns FALSE if the stored procedure did not return another result set. 范例
Example#1 Calling a stored procedure that returns multiple result sets In the following example, we call a stored procedure that returns three result sets. The first result set is fetched directly from the same statement resource on which we invoked the CALL statement, while the second and third result sets are fetched from statement resources returned from our calls to the db2_next_result() function.
<?php 上例将输出:
|