MySQL Error - Commands out of sync; you can't run this command now

前端 未结 4 1053
一生所求
一生所求 2021-01-06 11:38

I am using MySQL with PHP, Codeigniter. I had a question which was answered by bluefeet in the post here

I created a stored procedure for the second solution by blue

4条回答
  •  再見小時候
    2021-01-06 12:13

    In file

    system/database/drivers/mysqli/mysqli_result.php
    

    Add:

    function next_result()
    {
        if (is_object($this->conn_id))
        {
            return mysqli_next_result($this->conn_id);
        }
    }
    
    function result($type = 'object')
    {
        $result = array();
    
        if ($type == 'array') $result = $this->result_array();
        else if ($type == 'object') $result = $this->result_object();
        else $result = $this->custom_result_object($type);
    
        $this->next_result();
    
        return $result;
    }
    

提交回复
热议问题