Help for this page

Select Code to Download


  1. or download this
    while ($data = $sth->fetchrow_array()) {
        $hash{$data} = undef;
    }
    
  2. or download this
    $sql = 'SELECT col_1 FROM theTable';
    .....
    while ($data = $sty->fetchrow_array()) {
        push @my_list, $data;
    }
    
  3. or download this
    $sql = 'SELECT col_1, col_2, col_3, col_4, col_5 FROM theTable';
    .....
    while (@data = $sty->fetchrow_array()) {
        $my_hash{$data[0]} = [ $data[1], $data[2], $data[3], $data[4] ];
    }