fixed database connect
git-svn-id: http://yolanda.mister-muffin.de/svn@9 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
ab07f7baad
commit
b44ba64a23
2 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
require "/var/www/perl/include.pl";
|
require "/var/www/perl/include.pl";
|
||||||
|
|
||||||
sub fill_tagcloud {
|
sub fill_tagcloud {
|
||||||
|
$dbh = DBI->connect("DBI:mysql:$database:$host", $user, $pass);
|
||||||
my $sth = $dbh->prepare(qq{select text, count from tagcloud });
|
my $sth = $dbh->prepare(qq{select text, count from tagcloud });
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
while (my ($text, $count) = $sth->fetchrow_array())
|
while (my ($text, $count) = $sth->fetchrow_array())
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
use CGI::Session;
|
use CGI::Session;
|
||||||
use DBI;
|
use DBI;
|
||||||
use XML::Simple qw(:strict);
|
use XML::Simple qw(:strict);
|
||||||
$dbh = DBI->connect('DBI:mysql:gnutube:localhost', 'root', '');
|
|
||||||
|
$database = 'gnutube';
|
||||||
|
$host = 'localhost';
|
||||||
|
$user = 'root';
|
||||||
|
$pass = '';
|
||||||
|
|
Loading…
Reference in a new issue