Object of class mysqli_result could not be converted to string

Posted by Joann on Stack Overflow See other posts from Stack Overflow or by Joann
Published on 2010-05-12T19:53:32Z Indexed on 2010/05/12 20:04 UTC
Read the original article Hit count: 230

Filed under:
|

I asked Google to help me I got no luck. :-( Here's the particular code that generates the error:

$this->conn->query("UPDATE tz_members SET confirm='yes' WHERE usr='".$uname."'");

The whole function is the following:

    function update_confirm_field($code) {

    $uname = $this->conn->query("SELECT usr FROM tz_members WHERE 
                     confirm='".$code."'");

    $this->conn->query("UPDATE tz_members SET confirm='yes' WHERE 
                     usr='".$uname."'");
}

Forgive me if I have missed something stupid. Can anyone tell me what's causing the problem please???

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql