title: Mysqli Query is not returning any result
body: <p>I seem to be having trouble getting mysqli to return a result from my query. My code is:</p>
  
  <pre><code>$db_conn = get_database(); //function returns a static mysqli object reference
  
  if($result = $db_conn-&gt;query("SELECT city 
                                  FROM state 
                                 WHERE name='CA' ")) {
    $row = $result-&gt;fetch_object();
    $city= $row-&gt;city;
    $result-&gt;close();
  } else {
    echo $db_conn-&gt;error;
  }
  </code></pre>
  
  <p>When I echo the contents of the city variable, it contains nothing.  </p>