Help for this page

Select Code to Download


  1. or download this
    my($field1, $field2, $field3);
    $sth->prepare("SELECT Field1, Field2, Field3 ...");
    $sth->bind_columns(\($field1, $field2, $field3));
    while($sth->fetch) {
        print "$field1\t$field2\t$field3\n";
    }
    
  2. or download this
    my($field1, $field2, $field3);
    $sth->prepare("SELECT Field1, Field2, Field3 ...");
    $sth->bind_columns(map { \$$_ } @{ $sth->{NAME_lc} });
    while($sth->fetch) {
        print "$field1\t$field2\t$field3\n";
    }