I gues it is not possible this way. If you need to pass unknown amount of variables by reference, you can use an array:
PHP Code:
function bind_param($types, $args) {
call_user_func_array(array("parent", "bind_param"), $args);
}
// usage:
$stmt->bind_param("iii", array(&$param1, &$param2, &$param3));
Ugly hack
. Or you can pass always only one parameter and to provide so called "fluent interface":
PHP Code:
function bind_param($type, &$param) {
call_user_func_array(array("parent", "bind_param"), array(&$param));
return $this;
}
// usage:
$stmt->bind_param("i", $param1)
->bind_param("i", $param2)
->bind_param("i", $param3);
Or you can change the behavior and pass them by value...
Bookmarks