I am Using Mysqli Driver.
I am getting Command out of sync when i try to run the stored procedure. I have tried
free_result();
this is the snippet of my code can any 1 tell me the solution?
function block()
{
$qry = "CALL `sp_get_codes_by_block_id`(?)";
$result = $this->db->query($qry, $this->getBlockId());
$temp_array = array();
$temp_array = $result;
$result->free_result();
return $result->result_array();
}
解决方案
well i Actually figured out answer after alot of Brain storming and search.
$qry = "CALL `sp_get_codes_by_block_id`(?)";
$result = $this->db->query($qry, $this->getBlockId());
mysqli_next_result($this->db->conn_id);
return $result->result_array();