http://qs321.pair.com?node_id=561408


in reply to Perl and MySQL: Get number of rows affected

If samy_rios answer doesn't do what you want you can use this one:

my $select = "SELECT value FROM table WHERE distinguishing_value = ?"; my $sth = $dbh->prepare($select) or die $dbh->errstr(); $sth->execute() or die $dbh->errstr(); print $sth->rows;
see DBI