Calling a stored procedure from CodeIgniter's Active Record class

后端 未结 6 494
旧时难觅i
旧时难觅i 2020-12-05 17:09

In my CI application setup to query a mssql database. I want to execute a stored procedure from active record. But I

6条回答
  •  无人及你
    2020-12-05 17:39

    This a little modification from above answer. If you are using codeigniter 3 place this code in /system/database/drivers/mysqli/mysqli_driver.php:

    function free_db_resource()
    {
        do
        {
            if($l_result = mysqli_store_result($this->conn_id))
            {
                mysqli_free_result($l_result);
            }
        }
        while(mysqli_more_results($this->conn_id)  && mysqli_next_result($this->conn_id));
    }
    

    Then just call the function like others suggested here.

提交回复
热议问题