$sql = "SELECT count(*) FROM table WHERE name = 'Jamie'"; $sth = $dbh->prepare( $sql ); if ( $sth && $sth->execute() ) { $row = $sth->fetchrow_arrayref(); print( "Returned " . $row->[0] . " row(s)\n" ); } else { print( "Error " . $dbh->errstr() . "\n" ); exit( 1 ); }
In reply to Re: Count Number of rows retrieved from SELECT
by monarch
in thread Count Number of rows retrieved from SELECT
by dtharby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |