X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=mud.php;h=4309fef193f0526c178e9d83337317922d36570d;hb=19bbaf5a8dee8338c686751ddfe9abb9a12148c3;hp=0b0959906998396f9ab4a7dac4c48764403a798b;hpb=b71a8184a7827fd36939aa2bd2f888dae9a4f840;p=mudd.git diff --git a/mud.php b/mud.php index 0b09599..4309fef 100644 --- a/mud.php +++ b/mud.php @@ -22,7 +22,8 @@ abstract class model { public function query() { $args = func_get_args(); $statement = $this->db->prepare(array_shift($args)); - if ($args) call_user_func_array(array($statement, 'bind_param'), &$args); + #if ($args) call_user_func_array(array($statement, 'bind_param'), &$args); + if ($args) call_user_func_array(array($statement, 'bind_param'), $args); $statement->execute(); $statement->store_result(); $statement->store_result(); @@ -44,7 +45,7 @@ abstract class model { public function insert() { $args = func_get_args(); $statement = $this->db->prepare(array_shift($args)); - call_user_func_array(array($statement, 'bind_param'), &$args); + call_user_func_array(array($statement, 'bind_param'), $args); $statement->execute(); return $this->db->insert_id; } @@ -52,7 +53,7 @@ abstract class model { public function update() { $args = func_get_args(); $statement = $this->db->prepare(array_shift($args)); - call_user_func_array(array($statement, 'bind_param'), &$args); + call_user_func_array(array($statement, 'bind_param'), $args); $statement->execute(); return $this->db->insert_id; }