Welcome Guest, Not a member yet? Register   Sign In
Unable to select the specified database - After executing free_result?
#1

[eluser]Unknown[/eluser]
Morning all,

I've recently started learning how to use stored procedures and how to use them with Codeigniter.

Within one of my models i executed the following code:

Code:
function get_club($id)
{
    $this->db->free_result();
    $this->escape_data($id);
    $sql = "CALL get_club($id)";
    return $this->db->query($sql);
}

With regards to the
Code:
$this->db->free_result();
, i realise that is probably invalid, and i remember trying the following also (individually, not all at once).

Code:
$this->db->free_result();
$this->free_result();
$this->mysqli->free_result();

Now, after doing this i received a message saying <b>"Unable to select the specified database: 3month"</b>.

<b>My problem?:</b> I have removed all the free_result code and even the call procedure code and gone back to my last version, yet still i get the same message <b>"Unable to select the specified database: 3month"</b>.

<b>What iv tried:</b> As i said, i've gone back to my previous code, i've also re-downloaded the system directory.
#2

[eluser]Unknown[/eluser]
Well i feel stupid that my first post on here was such a stupid question.

I re-started my local server and that resolved the issue.

Apologies for the wasted thread, feel free to remove.
#3

[eluser]InsiteFX[/eluser]
Use this to free a query result...
Code:
$query->free_result();




Theme © iAndrew 2016 - Forum software by © MyBB