Welcome Guest, Not a member yet? Register   Sign In
Command out of sync
#2

[eluser]Unknown[/eluser]
When I tried to modify mysqli_driver.php as you showed none of my other regular SQL queries would work. So this is what I did...

Code:
function _execute($sql)
    {

        $sql = $this->_prep_query($sql);

        // This handles stored procedures....
        if  (stristr($sql,"call") && stripos($sql,"call")==0 ) {
            @mysqli_multi_query($this->conn_id, $sql);
            $result = @mysqli_store_result($this->conn_id);        
            if (@mysqli_more_results($this->conn_id)) {
                @mysqli_next_result($this->conn_id);            
            }
        } else {
            $result = @mysqli_query($this->conn_id, $sql);
        }
        
        return $result;
    
    }

I guess if you stuck to always using 1 case of the call command you could avoid the hit of the case insensitive string functions.

I really wish I could find a more elegant solution to this and still use syntax like $this->db->query("call someStoredProcedure");


Messages In This Thread
Command out of sync - by El Forum - 03-09-2008, 09:40 AM
Command out of sync - by El Forum - 04-02-2008, 01:57 PM
Command out of sync - by El Forum - 06-16-2008, 10:39 AM
Command out of sync - by El Forum - 04-13-2009, 01:07 AM
Command out of sync - by El Forum - 06-27-2009, 07:52 PM
Command out of sync - by El Forum - 08-08-2011, 06:30 AM
Command out of sync - by El Forum - 08-08-2011, 09:40 PM
Command out of sync - by El Forum - 08-09-2011, 02:58 AM
Command out of sync - by El Forum - 06-05-2014, 04:04 AM
Command out of sync - by El Forum - 06-05-2014, 12:07 PM
Command out of sync - by El Forum - 06-05-2014, 03:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB