Answer the question
In order to leave comments, you need to log in
How to fix PDO DBLIB: dbresults() returned FAIL?
There is a resulting procedure with a data set. I don't know the exact number of lines. To get them I use nextRowset() in a loop, as written in the doc. However, depending on the version of php (5.6.31) I am catching an error in the last iteration SQLSTATE[HY000]: General error: PDO_DBLIB: dbresults() returned FAIL . I found a couple of bug reports on this issue on Google and an indistinct answer to https://stackoverflow.com/questions/38012890/pdo-d... but something doesn't work.
tried like this:
do {
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($rows) {
$arr[] = $rows;
}
} while ($stmt->nextRowset());
while ($pdo->columnCount()) {
$data[] = $pdo->fetchAll(PDO::FETCH_ASSOC); //or, $pdo->fetchAll()
$pdo->nextRowset();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question