Hi, I’ve successfully created a procedure through phpMyAdmin and this saves and stores correctly. I can call the procedure, but I get errors complaining about:
‘ Error Executing Query: Commands out of sync; you can’t run this command now’
As far as I know this is because when calling a stored procedure it won’t allow results for multiple queries.
Does anyone know how to get around this? This is the PHP method where the procedure is called.
[code]
private function schemeReport()
{
$strSQL = ” CALL schemeResults()”;
$arrResults = db::getDataSet($strSQL);
foreach ($arrResults as $key => $value)
{
$objPickupAddress = new address($arrResults[$key][‘pickup_location_id’]);
$strDistrict = $objPickupAddress->getDistrict();
$strServiceCat = functions::getServiceCategory($arrResults[$key][‘service_type’]);
$jnyYear = date(‘Y’, strtotime($arrResults[$key][‘start_date’]));
$jnyMonth = date(‘n’, strtotime($arrResults[$key][‘start_date’]));
}
return $arrResultsSet;
}