Help for this page

Select Code to Download


  1. or download this
    while(@row = $sth->fetchrow_array) {
       ++$duplicate;
    }
    
  2. or download this
    my $dbh = DBI->connect($dsn, $usr, $pwd, {RaiseError => 1});
    my $sth = $dbh->prepare("insert into Customers(Names, ...) values(?, .
    +..)");
    ...
        # Handle this the same way that you would handle the
        # case where your checkDuplicateName() returns true
     }