All pastes #839712 Raw Edit

Untitled

public text v1 · immutable
#839712 ·published 2007-12-31 05:04 UTC
rendered paste body
function nick_mysqli_prepare_execute()
{
        $args = func_get_args();
        $db = array_shift($args);
        $sql_stmt = array_shift($args);

        if ($check = $db->prepare ($sql_stmt)) {
                call_user_func_array(array($check,'bind_param'), $args);
                $check->execute();
                #while ($all[] = $check->fetch_assoc()) {}
                while ($row = $check->fetch_array()){ $all[] = $row; }
                return $all;
        }
}