in reply to Re: DBI: Better way to find number of rows in a table?
in thread DBI: Better way to find number of rows in a table?
This won't work as expected.
$sth->rows returns the number of affected rows, and since in this case there are none, (COUNT is not a row affecting command) it will return -1, thus making TRUE all the items in the array. Therefore grep will return all the tables, even the empty ones.
|
|---|