in reply to DBD::Sybase $sth->rows returns -1
Rem: LIMIT the maximum rows returned, if you can.my $sth = $dbh->prepare('SELECT firstname, lastname FROM user WHERE ag +e >= ? ORDER BY age desc LIMIT 200'); $sth->execute(...); my $row = undef; while ($row = $sth->fetchrow_hashref) { print $row->{ firstname }, ' ', $row->{ lastname }, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::Sybase $sth->rows returns -1
by hotchiwawa (Scribe) on Jan 06, 2016 at 19:14 UTC | |
by AnomalousMonk (Archbishop) on Jan 06, 2016 at 19:48 UTC | |
by hotchiwawa (Scribe) on Jan 07, 2016 at 09:04 UTC | |
by 1nickt (Canon) on Jan 06, 2016 at 20:11 UTC | |
by hotchiwawa (Scribe) on Jan 07, 2016 at 09:07 UTC |