title: Object of class mysqli_result could not be converted to string error
body: <p>I asked Google to help me I got no luck. :-(
  Here's the particular code that generates the error:</p>
  
  <pre><code>$this-&gt;conn-&gt;query("UPDATE tz_members SET confirm='yes' WHERE usr='".$uname."'");
  </code></pre>
  
  <p>The whole function is the following:</p>
  
  <pre><code>    function update_confirm_field($code) {
  
      $uname = $this-&gt;conn-&gt;query("SELECT usr FROM tz_members WHERE 
                       confirm='".$code."'");
  
      $this-&gt;conn-&gt;query("UPDATE tz_members SET confirm='yes' WHERE 
                       usr='".$uname."'");
  }
  </code></pre>
  
  <p>Forgive me if I have missed something stupid. Can anyone tell me what's causing the problem please???</p>