in reply to Re: Re: Re: How to Speed up MySQL w/ Perl
in thread How to Speed up MySQL w/ Perl
Note that the data inserted doesn't get quotes tacked on - that's why you are using placeholders, quoting is being taken care of.eval { my $sth = $dbh -> prepare (<<' --'); update new_table set newData = ? where newID = ? -- while (my ($id, $data) = each %Data) { $sth -> execute ($data, $id) } }; if ($@) { $dbh -> rollback; die $@; } else { $dbh -> commit; }
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to Speed up MySQL w/ Perl
by dragonchild (Archbishop) on May 26, 2004 at 13:12 UTC | |
by Abigail-II (Bishop) on May 26, 2004 at 13:43 UTC | |
by dragonchild (Archbishop) on May 26, 2004 at 14:00 UTC | |
by Abigail-II (Bishop) on May 26, 2004 at 14:46 UTC | |
|
Re: Re: How to Speed up MySQL w/ Perl
by kiat (Vicar) on May 26, 2004 at 11:50 UTC | |
by Abigail-II (Bishop) on May 26, 2004 at 11:59 UTC | |
by kiat (Vicar) on May 26, 2004 at 12:05 UTC |