title: My project works fine on my local machine, but not on the web server
body: <p>My project is working fine on my local machine but not on the web server.  I think it is the stored procedures, because the error that I am getting is:</p>
  
  <p><code>Fatal error: Call to a member function fetch_array() on a non-object in ...</code></p>
  
  <p>The collation of the database is "utf8_general_ci".</p>
  
  <p>Just a simple example:</p>
  
  <blockquote>
    <p>I have a stored procedure called offices:</p>
    
    <p>CREATE PROCEDURE offices()</p>
    
    <p>BEGIN</p>
  
  <pre><code>SELECT * FROM offices;
  </code></pre>
    
    <p>END//</p>
  </blockquote>
  
  <p>And the php code:</p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <blockquote>
    <p>require ("db.php");</p>
    
    <p>$db = dbConnect();</p>
    
    <p>$result = $db->query("CALL offices()");</p>
    
    <p>while(list($id, $city, $address) = $result->fetch_array())</p>
    
    <p>echo "($id) $city: $address <br />";</p>
    
    <p>?></p>
  </blockquote>