peppiv has asked for the wisdom of the Perl Monks concerning the following question:
my $sth = $dbh->prepare("SELECT DISTINCT country, COUNT(*) FROM contac +ts WHERE country != '' GROUP BY country ORDER BY 2 DESC"); $sth->execute() or die $sth->errstr; while (my @result = $sth->fetchrow_array()) { print qq($result[0], $result[1]); } $sth->finish();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Limit results of a DBI query
by Fletch (Bishop) on Jan 28, 2003 at 16:51 UTC | |
by peppiv (Curate) on Jan 28, 2003 at 16:56 UTC | |
Re: Limit results of a DBI query
by mpeppler (Vicar) on Jan 28, 2003 at 16:36 UTC | |
by peppiv (Curate) on Jan 28, 2003 at 16:53 UTC | |
by mpeppler (Vicar) on Jan 28, 2003 at 21:17 UTC | |
by peppiv (Curate) on Jan 28, 2003 at 21:39 UTC | |
by mpeppler (Vicar) on Jan 28, 2003 at 21:44 UTC | |
Re: Limit results of a DBI query
by SysApe9000 (Acolyte) on Jan 28, 2003 at 17:49 UTC | |
Re: Limit results of a DBI query
by Ryszard (Priest) on Jan 29, 2003 at 07:08 UTC | |
Re: Limit results of a DBI query
by Anonymous Monk on Jun 27, 2009 at 16:15 UTC |