In my CI application setup to query a mssql database. I want to execute a stored procedure from active record. But I
I have added the following function to class CI_DB_mysqli_driver in /system/database/drivers/mysqli/mysqli_driver.php
function free_db_resource()
{
while(mysqli_next_result($this->conn_id))
{
if($l_result = mysqli_store_result($this->conn_id))
{
mysqli_free_result($l_result);
}
}
}
and use it after the procedure call
$this->db->free_db_resource();
Thanks to wework4web