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();

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
> 

Reply via email to