All pastes #840330 Raw Edit

Someone

public text v1 · immutable
#840330 ·published 2007-12-31 18:47 UTC
rendered paste body
function nick_mysqli_prepare_execute()
{
        $args = func_get_args();
        $db = array_shift($args);
        $sql_stmt = array_shift($args);
        $check = $db->stmt_init();
        if ($check = $db->prepare ($sql_stmt)) {
                # call_user_func_array allows me to pass the args on without
                # knowing how many there are
                call_user_func_array(array($check,'bind_param'), $args);
                $check->execute();
                #$check->bind_result($all);
                call_user_func_array(array($check,'bind_result'),$all);
                $check->fetch();
                #while ($row = $check->fetch_row()){ $all[] = $row; };
                return $all;
        }
}



error as follows:
Warning: Wrong parameter count for mysqli_stmt::bind_result() in /BLAH/mysqli_sane.php on line 14