0

I want to call my stored procedure in CodeIgniter, but nothing works. I added a new function called free_db to mysqli_result, but it still doesn't work. It gives me the result, but the error persists. How can I fix this?

Controller:

 public function best_selling() {
        $data = $this->graph->getGraph();
        print_r($data);
 }

Model:

public function getGraph() {
        $data = $this->db->query('CALL storelte_best_selling()');
        return $data->result_array();
}

Setting database:

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => '**********',
    'password' => '*********',
    'database' => 'storelte',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

stored_procedure_error

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • do you have the drivers loaded in this file location system/database/drivers/mysqli/mysqli_result.php – unixmiah Jun 10 '17 at 02:27
  • how can I check if there are loaded? – Craig Smith Jun 10 '17 at 02:51
  • This is something I encountered many many years ago. Just performing a lil search came up with this which should help... https://stackoverflow.com/questions/43232250/codeigniter-commands-out-of-sync-you-cant-run-this-command-now – TimBrownlaw Jun 10 '17 at 15:27

0 Answers0