Problem with mysqli_bind_param

From: Date: Mon, 30 Jan 2017 15:22:21 +0000
Subject: Problem with mysqli_bind_param
Groups: php.general 
Request: Send a blank email to php-general+get-325951@lists.php.net to get a copy of this message
I don't know if its a bug, a feature or just me being idiotic ( i don't really discarded that yet )... but... This is a small piece of my code. if ( !empty( $types )) { $tmp = Array( $types ); foreach( $array as $key => $value ) { $tmp[] = &$array[ $key]; } call_user_func_array( array( $stmt, 'bind_param' ), $tmp ); } My problem was i get NULL on return of call_user_func_array... i tracked it back to $stmt->bind_param( $types, $array[0], $array[1], $array[2] ); Then after all and some reading i found i was screwing up, yet, returning null should be the right return? I ask because it says nothing about NULL on http://php.net/manual/en/mysqli-stmt.bind-param.php. Yet if i send something that isn't a string in $types ( my screw up, anyway ) it don't return false as i expected. Thanks, Diogo Neves

« previous php.general (#325951) next »