Help for this page

Select Code to Download


  1. or download this
    use DBI;
    
    ...
    $dbh = DBI->connect($dsn, 'user', 'password');
    $sth = $dbh->prepare("SELECT * FROM numbers");
    $sth->execute;
    
  2. or download this
      while (my $ref = $sth->SOMETING HERE) {
      print "The name field " . $ref[name];  
      print "The phone1 field " . $ref[phone1];
      print "The phone2 field " . $ref[phone2];
      }