[#1]
Tex Morgan [2013-07-06 22:45:13]
There's a simpler way to clear out database stored procedure problems:
class MySQLiQuery {
protected $_resultSet;
protected $databaseConnection;
....
protected function free(){
$this->_resultSet->free();
$this->_resultSet=null;
}
protected function checkMoreResults(){
if($this->databaseConnection->more_results()){
return true;
} else {
return false;
}
}
protected function clearResults(){
if($this->checkMoreResults()){
if($this->databaseConnection->next_result()){
if($this->_resultSet=$this->databaseConnection->store_result()){
$this->free();
}
$this->clearResults(); //
}
}
}
.......
}