Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

affected_rows puzzle

Status
Not open for further replies.

audiopro

Programmer
Joined
Apr 1, 2004
Messages
3,165
Location
GB
Not sure whether this should be posted here or in MySQL as it is a MySQL query via DBI from a perl script.
I need to get the number of rows affected during a query.
I have been searching round for the syntax and the different versions are confusing.
Code:
my $rows = $sth->affectedrows;
my $rows = $sth->affected_rows;
my $rows = $sth->affected_rows();
my $rows = $sth->mysql_affected_rows();
None of these appear to work, have I got the right syntax or am I doing the call all wrong?


Keith
 
Sorry.
The standard
Code:
my $ra = $sth->rows;
does the job

Keith
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top