Thread Abfrage nicht vollständig, benötige Hilfe (14 answers)
Opened by Gast at 2007-09-27 14:45

Gast Gast
 2007-09-27 15:51
#100067 #100067
Kleine Frage hätte ich da noch... So wie die pm jezze ist... Ist da irgendwas überflüssiges drin? Oder gerade gut so?

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
        my $user = $main->{current_user};
        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 = '$user->{name}' AND new = '1'");    
        $sth->execute();

        my @count = $dbh->selectrow_array(q{SELECT COUNT(1) FROM pm_in WHERE pm_to=? and new=1}, undef, $user->{name});

        my $output = $main->createInfoOutput('newmails',{mails => $count[0]});

        return [$output];

        $sth->finish();
        $dbh->disconnect();

View full thread Abfrage nicht vollständig, benötige Hilfe