yolanda/trunk/functions.pl

14 lines
383 B
Perl
Raw Normal View History

require "/var/www/perl/include.pl";
sub fill_tagcloud {
$dbh = DBI->connect("DBI:mysql:$database:$host", $user, $pass);
my $sth = $dbh->prepare(qq{select text, count from tagcloud });
$sth->execute();
while (my ($text, $count) = $sth->fetchrow_array())
{
push @{ $page->{tagcloud}->{tag} }, { text => [$text], count => [$count] };
}
$sth->finish();
$dbh->disconnect();
}