igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
I used to do something like this on MySQL:
Is there a way to determine the number of rows, found by select, if not with $sth->rows?
and it returned a number of rows, found by SELECT, but, no matter, what SELECT variation I use with SQLite, even when it returns the actual row data with $sth->fetchrow_hashref(), it always returns 0 (zero).$sth = $dbh->prepare("SELECT * FROM table"); if($sth->execute()){ printf "Executed Statement - returned (%s) rows\n", $sth->rows; }
Is there a way to determine the number of rows, found by select, if not with $sth->rows?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: SQLite: how to get a number of rows from SELECT query
by Corion (Patriarch) on Jul 20, 2021 at 06:00 UTC | |
by igoryonya (Pilgrim) on Jul 20, 2021 at 07:33 UTC | |
by Fletch (Bishop) on Jul 20, 2021 at 13:28 UTC | |
Re: SQLite: how to get a number of rows from SELECT query
by derby (Abbot) on Jul 20, 2021 at 11:18 UTC | |
Re: SQLite: how to get a number of rows from SELECT query
by Arunbear (Prior) on Jul 21, 2021 at 11:28 UTC | |
Re: SQLite: how to get a number of rows from SELECT query
by erix (Prior) on Jul 29, 2021 at 22:58 UTC | |
Re: SQLite: how to get a number of rows from SELECT query
by perlfan (Vicar) on Jul 29, 2021 at 22:38 UTC | |
Re: SQLite: how to get a number of rows from SELECT query
by Anonymous Monk on Jul 20, 2021 at 20:55 UTC |
Back to
Seekers of Perl Wisdom