in reply to DBI and UPDATE
If you're careful, you can simulate this...
my $dbh = DBI->connect(blah) or die $DBI::errstr; my $sth = $dbh->prepare('UPDATE MYTABLE SET col1=?,col2=?'); $sth->execute(@data);
...with this...
my $dbh = DBI->connect(blah) or die $DBI::errstr; my $sth = $dbh->prepare('UPDATE MYTABLE SET col1=?,col2=?'); $sth->execute(@data);
:-)
In other words, that code looks fine to me. Have you tried it? If so, what is your error? If it's not working, post a code snippet, the error, and the database you're using.
Also, did you intentially leave out a WHERE clause? Without it, you're going to update every row in the table. Probably not what you wanted.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|