Help for this page

Select Code to Download


  1. or download this
        select foo from bar limit 3
    
  2. or download this
        select data from frog limit 3
    
  3. or download this
        my($data);
        $sth->bind_columns(\$data);
        while ($sth->fetch) {
            print $data;
        }
    
  4. or download this
        my $sth = $dbh->prepare(<<SQL);
    select id, data from frog limit 3
    ...
        while ($sth->fetch) {
            print $id, "\t", $data, "\n";
        }