Which of the following methods of PDOStatement class returns the next rowset in a multi-query statement?
PDOStatement->nextRowset()
Correct:
PDOStatement->nextRowset()
Explanation:
Answer option D is correct.
The PDOStatement->nextRowset() method of PDOStatement class returns the next rowset in a multi-query statement.
Answer option C is incorrect. The PDOStatement->rowCount() method returns the number of rows affected by the last SQL statement.
Answer option B is incorrect. The PDOStatement->fetchAll() method returns an array containing all of the result set rows.
Answer option A is incorrect. The PDOStatement->fetch() method fetches the next row from a result set.
https://www.php.net/manual/en/pdostatement.nextrowset.php