Thread Abfrage nicht vollständig, benötige Hilfe
(14 answers)
Opened by Gast at 2007-09-27 14:45
Hi, danke soweit. Aber: Ausgabe ist immernoch "Sie haben 0 Emails" und jaaaaaa ich habe Mails :D
Habs nu so: Code (perl): (dl
)
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(); } |