Jump to content

Non-object bind_param


Locked

Recommended Posts

Now i know that when i get this error message that it would mean i havent set it correct but i cant see why its not set right.

 

                $stmt = $mysqli->prepare('SELECT id FROM user_details WHERE user_name = ?');
                $stmt -> bind_param('s',$this->get_username());
                $stmt -> execute() or $this->error->report_error($stmt->error,TRUE); 
                $stmt -> store_result();
                $stmt -> bind_result($userid);
                $stmt -> fetch();
                $stmt = $mysqli->prepare('INSERT INTO users_disabled (userid,recover_code) VALUES(?,?)');
                $stmt -> bind_param('ss',$userid,$userid); // It fails here.
                $stmt -> execute() or $this->error->report_error($stmt->error,TRUE); 

 

It fails on the last bind_param

 

Any help is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/190350-non-object-bind_param/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.