perl.beginners
[Top] [All Lists]

Re: Count of number of rows returned in delete / update sql in Perl DBI

Subject: Re: Count of number of rows returned in delete / update sql in Perl DBI ?
From: Rob Dixon
Date: Thu, 10 Jul 2008 15:42:00 +0100
Newsgroups: perl.beginners


Amit Saxena wrote:
> Hi all,
> 
> I want to know how to get the count of number of rows returned in delete /
> update sql in Perl DBI ?
> 
> I have ready some articles on the internet and it states that the "execute"
> function returns the number of rows affected though it's not confirmed to
> work for all the database.
> 
> Is there any solution which will surely work on all databases ?

I suggest that you simply test to make sure that it works on your database.
'execute' will return -1 if the number of rows affected is unknown.

Rob

<Prev in Thread] Current Thread [Next in Thread>