Is it possible to grab a variable number of parameters and send the appropriate amount to another function?

<?php
// Some class
$this->db->prepare("SELECT * FROM `table` WHERE (`id`=?)");
$this->db->bind('ii', $id1);

$this->db->prepare("SELECT * FROM `table` WHERE (`id`=? AND `other_id`=?)");
$this->db->bind('ii', $id1, $id2);

// DB class
function bind () {
  $args = func_get_args();
  $this->statement->bind_param($args[0], $args[1], ...);
}
?>

Ok, is it possible to send any number of variables to db->bind() in order to send those to statement->bind_param()?

Or, if someone else has a better db abstraction method, feel free to educate...

Thanks,
~Phil

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to