Retrieving Multiple Result sets with stored procedure in php/mysqli

后端 未结 3 2019
暗喜
暗喜 2020-11-27 07:05

I have a stored procedure that has multiple result sets. How do I advance to the 2nd result set in mysqli to get those results?

Let\'s say it\'s a stored proc like:<

3条回答
  •  执笔经年
    2020-11-27 07:42

    It looks like MySQLi may only support multiple result sets through mysqli_multi_query(), since MySQLi_STMT objects work differently from MySQLi_Result objects.

    PDO seems to be somewhat more abstracted, with the PDOStatement objects being able to handle multiple result sets for both regular queries (PDO::query) and prepared statements(PDO:prepare).

提交回复
热议问题