Help for this page

Select Code to Download


  1. or download this
    unshift @fields, qw(hostname host_id);
    my $insert = "INSERT IGNORE INTO $thisTable (" . join(", ", @fields) .
    + ") VALUES (" . join(",", ('?') x @fields) . ")";
    ...
      my $this_insert = [ $site_hostname, $site_id, @row ];
      push @central_insert, $this_insert;
    }
    
  2. or download this
    my $sth = $dbh->prepare($insert);
    $sth->execute(@$_) for @central_insert;