[eluser]browntown[/eluser]
I have recently stumbled onto an issue with stored procedures in CodeIgniter. I've used stored procedures with CodeIgniter projects before...never had a problem...until now.
I am able to call a stored procedure once...then I get an error stating:
Code:
A Database Error Occurred
Unable to select the specified database: databasename
Filename: C:\Apache2.2\htdocs\databasename\bonfire\codeigniter\database\DB_driver.php
Line Number: 140
Once this happens I have to restart Apache before I can hit the site again.
I'm using the mysqli driver and a persistent database connection.
I'm calling the stored procedure from the following code in my model:
Code:
$this->db->reconnect();
$sql = "call getProgram($id)";
$query = $this->db->query($sql);
$result = $query->result_array();
return $result[0];
Does anyone have any ideas? Thanks.