title: mysqli object how do I get the fields
body: <p>$result = $conn->query("SELECT * FROM temp_users WHERE reg_code ='$passkey'");</p>
  
  <p>This works:</p>
  
  <pre><code>if($result-&gt;num_rows == 1){
  </code></pre>
  
  <p>values from print_r($result);</p>
  
  <pre><code>mysqli_result Object ( [current_field] =&gt; 0 [field_count] =&gt; 11 [lengths] =&gt; [num_rows] =&gt; 1 [type] =&gt; 0 )
  </code></pre>
  
  <p>but <code>$result-&gt;username</code> where username is a field in the db shows up blank? </p>