brwarn has asked for the wisdom of the Perl Monks concerning the following question:
my $dsn = "DBI:mysql:database=$db1;host=$host;port=$port"; my $dbh = DBI->connect($dsn, $user, $pw, { RaiseError => 1, AutoCommit => 0 }); # delete records from table rtemp my $sql = "delete from database.table"; my $sth = $dbh->prepare($sql); my $sth1 = $dbh->do($sql);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI to delete rows
by velusamy (Monk) on Mar 05, 2009 at 04:30 UTC | |
by brwarn (Novice) on Mar 05, 2009 at 04:56 UTC |