fix count from query if needed
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 20:07:30 +0000 (22:07 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 20:07:30 +0000 (22:07 +0200)
koha.pl

diff --git a/koha.pl b/koha.pl
index 8310329..1394cea 100755 (executable)
--- a/koha.pl
+++ b/koha.pl
@@ -79,6 +79,8 @@ limit 100
        });
        $sth->execute( $city, $country );
 
+       $count = $sth->rows if $sth->rows > $count;
+
        my $descript = "<b>$city</b> <em>$country</em> $count items\n<ol>";
 
        while ( my $row = $sth->fetchrow_hashref ) {