On Wed, 2002-12-18 at 14:19, Paul Boutros wrote: > That's the return value from a non-select SQL statement's execution. This > is in the DBI documentation, I believe. > > Basically, you want: > > my $sql = 'UPDATE TEST SET TEST.TEST1 = 3 WHERE TEST.TEST2 = 2'; > my $sth = $dbh->prepare($sql); > my $rows_affected = $sth->execute();
See also the $sth->rows() call. Michael > On Wed, 18 Dec 2002, Adam Peterson wrote: > > > hi, > > > > i'm running a cgi script that updates a database. i would like to capture > > the number of rows affected by the update, but can't figure out how to. i > > would like $rows_affected to equal the standard "(1 row(s) affected)" that > > is returned from a worksheet. > > > > thanks for any help. > > > > -adam > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > > http://mailplus.yahoo.com > > -- Michael Peppler Data Migrations, Inc. [EMAIL PROTECTED] http://www.mbay.net/~mpeppler Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.mbay.net/~mpeppler/resume.html
signature.asc
Description: This is a digitally signed message part