note 95867 rejected from mysqli-stmt.bind-result by danbrown

From: Date: Tue, 26 Jan 2010 20:57:57 +0000
Subject: note 95867 rejected from mysqli-stmt.bind-result by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165333@lists.php.net to get a copy of this message
Note Submitter: baldr dot theinnocent at gmail dot com ---- hi how do you return variables from a prepared statment. i have the following stored procedure ######################### CREATE DEFINER=root@localhost PROCEDURE sp_register_user( IN p_username VARCHAR(255), IN p_pass VARCHAR(255), IN p_email VARCHAR(255), OUT p_userid INT ) BEGIN INSERT INTO users (username, pass, email, confirmed) VALUES ( p_username, SHA1(p_pass),p_email, FALSE); SET @a=LAST_INSERT_ID(); SELECT @a INTO p_userid; INSERT INTO activation (email, activationcode, userid) VALUES (p_email, SHA1(now()), @a); END ######################### php code ######################### if($query = $con->prepare ("CALL sp_register_user(?,?,?,?)")){ $query->bind_param("sssi", $user, $pass, $email, $result); $query->execute(); $query->close(); ######################### coould anyone let me know what im doing wrong

« previous php.notes (#165333) next »