Help for this page

Select Code to Download


  1. or download this
    my @columns = @{$sth->{NAME_uc}};
    $sth->bind_columns(\@row{@columns});
    my @data_cols = grep { $_ ne 'NAME' } @columns;
    ...then later
    $data->{"data_$i"} = { map { $_ => $row{$_} } @data_cols };
    
  2. or download this
    # This only works if NAME is the first column...or you
    # would have to change the "select *" to select
    ...
    push @names, $name;
    ...and
    $data->{"data_$i"} = { %row };