|< 1 2 >| | 15 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
my $dbh = DBI->connect("$db_name","$db_user","$db_pass") || die "Database connection not made: $DBI::errstr"; my $sth = $dbh->prepare("SELECT * FROM pm_in WHERE pm_to = '$nick' AND new = '1' ORDER BY date DESC"); $sth->execute(); my @entries=(); my $count=0; while(@entries=$sth->fetchrow_array) { $count++; } my $output = $main->createInfoOutput('newmails',{mails => $sth}); return [$output]; $sth->finish(); $dbh->disconnect();
1 2 3 4 5 6 7 8 9 10 11 12 13 14
my $dbh = DBI->connect("$db_name","$db_user","$db_pass") || die "Database connection not made: $DBI::errstr"; my $sth = $dbh->prepare("SELECT * FROM pm_in WHERE pm_to = '$nick' AND new = '1' ORDER BY date DESC"); $sth->execute(); my $count=0; while(my @entries = $sth->fetchrow_array){ print "Datensatz: @entries\n"; $count++; } #my $output = $main->createInfoOutput('newmails',{mails => $sth}); $sth->finish(); $dbh->disconnect();
my $output = $main->createInfoOutput('newmails',{mails => $cout});
1 2 3 4
$dbh->prepare("SELECT COUNT(1) FROM pm_in WHERE pm_to = '$nick' AND new = '1'"); $sth->execute(); my $count = $sth->fetchrow_array; my $output = $main->createInfoOutput('newmails',{mails => $count[0]});
1 2
$dbh->prepare("SELECT COUNT(1) FROM pm_in WHERE pm_to = ? AND new = '1'"); $sth->execute($nick);
1 2
my ($count) = $sth->fetchrow_array; my $output = $main->createInfoOutput('newmails',{mails => $count});
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
my $dbh = DBI->connect("$db_name","$db_user","$db_pass") || die "Database connection not made: $DBI::errstr"; my $sth = $dbh->prepare("SELECT * FROM gtchat_pm_in WHERE pm_to = 'nick' AND new = '1' ORDER BY date DESC"); $sth->execute(); my $count=0; while(my @entries = $sth->fetchrow_array){ #print "Datensatz: @entries\n"; $count++; } my $output = $main->createInfoOutput('newmails',{mails => $count}); return [$output]; $sth->finish(); $dbh->disconnect(); }
1 2
my $count = $dbh->selectrow_array(q{SELECT COUNT(1) FROM gtchat_pm_in WHERE pm_to=? and new=1}, undef, $nick); my $output = $main->createInfoOutput('newmails',{mails => $count});
1 2 3 4 5 6 7 8 9 10 11 12 13 14
my $dbh = DBI->connect("$db_name","$db_user","$db_pass") || die "Database connection not made: $DBI::errstr"; my $sth = $dbh->prepare("SELECT * FROM gtchat_pm_in WHERE pm_to = '$nick' AND new = '1' ORDER BY date DESC"); $sth->execute(); my $count = $dbh->selectrow_array(q{SELECT COUNT(1) FROM gtchat_pm_in WHERE pm_to=? and new=1}, undef, $nick); my $output = $main->createInfoOutput('newmails',{mails => $count}); return [$output]; $sth->finish(); $dbh->disconnect(); }
1 2
my ($count) = $dbh->selectrow_array(q{SELECT COUNT(1) FROM gtchat_pm_in WHERE pm_to=? and new=1}, undef, $nick); my $output = $main->createInfoOutput('newmails',{mails => $count});
1 2
my @count = $dbh->selectrow_array(q{SELECT COUNT(1) FROM gtchat_pm_in WHERE pm_to=? and new=1}, undef, $nick); my $output = $main->createInfoOutput('newmails',{mails => $count[0]});
Gast+2007-09-27 13:14:39--Hi,
so gehts leider auch nicht:
|< 1 2 >| | 15 Einträge, 2 Seiten |