Monday, November 24, 2003, 6:10:09 PM, you wrote:
opracuj diff i postnij tutaj, to ktoś wrzuci.
No to chyba bedzie jakos tak: Do werji lms-notify 1.27 sciagnietej z Repozytorium CVS --- lms-notify.org 2003-11-24 23:00:09.000000000 +0100 +++ /usr/sbin/lms-notify 2003-11-24 23:05:57.000000000 +0100 @@ -154,7 +154,7 @@ my @mtempl = <MTFILE>; close MTFILE; -my $dbq = $dbase->prepare("SELECT users.id AS id, lastname, name, email, phone1, SUM((type * -2 + 7) * cash.value) AS balance FROM users LEFT JOIN cash ON users.id = cash.userid GROUP BY users.id HAVING SUM((type * -2 + 7) * cash.value) < 0"); +my $dbq = $dbase->prepare("SELECT users.id AS id, email, name, lastname, SUM((type * -2 +7) * cash.value) AS balance FROM users LEFT JOIN cash ON users.id = cash.userid AND (cash.type = 3 OR cash.type = 4) WHERE deleted = 0 GROUP BY users.id, name, lastname, email"); $dbq->execute(); while (my $row = $dbq->fetchrow_hashref()) { @@ -252,7 +252,7 @@ if ($line =~ /\%last_10_in_a_table/ ) { my $last10_dbq = $dbase->prepare("SELECT comment,value,type,time FROM cash WHERE - userid='$row->{'id'}' AND (type>='3' ) ORDER BY time DESC LIMIT 0,10") ; + userid='$row->{'id'}' AND (type>='3' ) ORDER BY time DESC LIMIT 10") ; # ok, now we are going to rise up system's load $last10_dbq->execute(); $smtp->datasend("Data | Opis | Wartość\n"); ps. Niech ktos tylko sprawdzi czy czegos nie skopalem przez przypadek -- [ Krzysztof Zagórski GG:147848 ICQ: 236331820 GSM: +48 1E 0B 20 BC ] [ ircname: Maverick rlu:215007 PGP Key: http://3281429070/pgp ] [ http://znirevpx.wrfg.gjbvz.theh.cy mailto: maverick@irc.pl ]