Hi
I have code where I connected to the database like so:
$db = new mysqli("localhost", "user", "pass", "company");
Now when I query the database like so:
//query calls to a stored procedure 'user_info'
$result = $db->query("CALL user_info('$instruc', 'c_register', '$eml', '$pass', '')");
if($result->fetch_array())
{
//use the results
}
$result->close();
$result = $db->query("CALL user_info('$instruc', 's_login', '$eml', '$pass', '')");
if($result->fetch_array())
{
//use the results
}
$result->close();
I get this error after the first $result->close();
Fatal error: Call to a member function fetch_array() on a non-object in...
For me to run this other query I have to close the db conection and connect again, then it will work. I want to know if there is a way I could run the other query without having to disconnect and reconnect to the database.
thanks in advance.