Monday, November 24, 2003, 5:27:03 PM, you wrote:
Witam.
A z changeloga wynika ze kolumny users.tariff juz niema. Czy ktos obeznany moze mi podac co powinno byc wpisane?
wersja 1.1.4 Tanith (03/10/2003):
(...)
<ciach>
To zrobilem, i nadal byly problemy. Pomoglo podgladniecie jak wygladaja wpisy w module do demona.
Zmienilem sobie:
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");
na:
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");
I drugi wpis jaki sie wywalal (przynajmniej u mnie):
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") ;
na:
my $last10_dbq = $dbase->prepare("SELECT comment,value,type,time FROM cash WHERE userid='$row->{'id'}' AND (type>='3' ) ORDER BY time DESC LIMIT 10") ;
i teraz wyglada ze dziala juz bez zastrzezen.
uczestnicy (1)
-
Krzysztof Zagorski