note 117627 deleted from mysqli-stmt.bind-param by cmb

From: Date: Sun, 22 Sep 2019 08:07:10 +0000
Subject: note 117627 deleted from mysqli-stmt.bind-param by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212316@lists.php.net to get a copy of this message
Note Submitter: code at roberthairgrove dot com ---- When I tried to use nickv9's class BindParam, I had to make a small change to get it to work: <?php // snip... public function add( $type, &$value ){ $this->values[] = &$value; $this->types .= $type; } // snip... ?> Note the additional reference notation used within the function to add the parameter to the class variable (&$value instead of $value), not just in the parameter list. Otherwise, I got an error from call_user_func_array(): "Parameter 2 to mysqli_stmt::bind_param() expected to be a reference, value given..."

« previous php.notes (#212316) next »