title: I having a problem with the mysqli free() member function
body: <p>I have code where I connected to the database like so:</p>
  <pre><code>$db = new mysqli(&quot;localhost&quot;, &quot;user&quot;, &quot;pass&quot;, &quot;company&quot;);
  </code></pre>
  <p>Now when I query the database like so:</p>
  <pre><code>//query calls to a stored procedure 'user_info' 
  $result = $db-&gt;query(&quot;CALL user_info('$instruc', 'c_register', '$eml', '$pass', '')&quot;);
  if($result-&gt;fetch_array())
  {
     //use the results
  }
  $result-&gt;close();
  
  $result = $db-&gt;query(&quot;CALL user_info('$instruc', 's_login', '$eml', '$pass', '')&quot;);
  if($result-&gt;fetch_array())
  {
     //use the results
  }
  $result-&gt;close();
  </code></pre>
  <p>I get this error after the first <code>$result-&gt;close();</code></p>
  <blockquote>
  <p>Fatal error: Call to a member function fetch_array() on a non-object in...</p>
  </blockquote>
  <p>For me to run this other query I have to close the db connection 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.</p>