A Database Error Occurred
Error Number: 2014Commands out of sync; you can't run this command now
call sp_TotalTicketRegionDaily("2017-10-2")
Filename: modules/home/models/Mhome.php
Line Number: 41
Solution
add following code into /system/database/drivers/mysqli/mysqli_result.php
then in model when you call Stored Procedure
function next_result()
{
if (is_object($this->conn_id))
{
return mysqli_next_result($this->conn_id);
}
}
$query = $this->db->query("CALL test()");
$res = $query->result();
//add this two line
$query->next_result();
$query->free_result();
//end of new code
return $res;
Komentar
Posting Komentar