2007-10-10 09:44:51 +00:00
|
|
|
require "/var/www/perl/include.pl";
|
|
|
|
|
2007-10-10 09:01:16 +00:00
|
|
|
sub fill_tagcloud {
|
2007-10-10 09:49:16 +00:00
|
|
|
$dbh = DBI->connect("DBI:mysql:$database:$host", $user, $pass);
|
2007-10-10 09:01:16 +00:00
|
|
|
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();
|
|
|
|
}
|