i had a read through the other answers and most were resolved by adding the $sth->closeCursor(); I have multiple calls to sprocs after each other and still getting the error on each of them.
Here my code:
<?php
$sql = "CALL get_salesquote_lineitems(:salesquoteguid);";
$array = array('salesquoteguid' => $salesquoteguid);
$sth = $dbh->prepare($sql);
if ($sth->execute($array)) {
$lineItems = $sth->fetchAll(PDO::FETCH_ASSOC);
$sth->closeCursor();
}
$sql = "CALL get_salesquote_totals(:salesquoteguid);";
$array = array('salesquoteguid' => $salesquoteguid);
$sth = $dbh->prepare($sql);
if ($sth->execute($array)) {
$totalData = $sth->fetchAll(PDO::FETCH_ASSOC);
$sth->closeCursor();
}
$sql = "CALL get_salesquote_data(:salesquoteguid);";
$array = array('salesquoteguid' => $salesquoteguid);
$sth = $dbh->prepare($sql);
if ($sth->execute($array)) {
$quoteData = $sth->fetchAll(PDO::FETCH_ASSOC);
$sth->closeCursor();
}
$sql = "CALL get_salesquote_warranty_rows(:salesquoteguid);";
$array = array('salesquoteguid' => $salesquoteguid);
$sth = $dbh->prepare($sql);
if ($sth->execute($array)) {
$warrantyRows = $sth->fetchAll(PDO::FETCH_ASSOC);
$sth->closeCursor();
}
i also tried:
$cn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
any further help please? thanks