Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare( "INSERT INTO data_profile (file) VALUES (?)")
    +;
    for (@array) {
        $sth->execute($_);
    }
    
  2. or download this
    # assume that @array contains qw(abc def ghi);
    my $query = 'INSERT INTO data_profile (file) VALUES ';
    ...
    
    # now $query will be 'INSERT INTO data_profile (file) VALUES (?),(?),(
    +?)'
    $dbh->do($query, @array);