Stored Procedure dan Query Standard di codeigniter

beberapa hari ini saya mencoba menggunakan stored procedure di codeigniter, lalu saya mendapati error seperti ini

Error Number: 2014
Commands out of sync; you can't run this command now

beberapa hari saya googling ga nemu gimana cara ngatasinnya, tapi sekarang sudah tidak error,
caranya, buka system/database/drivers/mysqli/mysqli_driver.php

cari function _execute dan custom menjadi seperti ini

function _execute($sql)
{
$sql = $this->_prep_query($sql);
$result = @mysqli_query($this->conn_id, $sql);
@mysqli_next_result($this->conn_id);
return $result;
}

sebelumnya pada config, setting database.php seperti di bawah

$db[‘default’][‘dbdriver’] = ‘mysqli’;
$db[‘default’][‘dbprefix’] = ”;
$db[‘default’][‘pconnect’] = FALSE;

its work no error

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s