13 Wrz
2005
13 Wrz
'05
20:46
Andrzej Banach napisał(a):
A moze ktos powie jak uproscic te zapytanie by wyszukiwanie bilansu i danych abonenta twalo krocej??
nie potrzebujesz złaczenia z nodes:
SELECT customers.id AS id, customers.lastname AS lastname, customers.name AS name, ROUND(SUM((type * -2 + 7) * value),2) AS balance FROM customers LEFT JOIN cash ON (customers.id = customerid) WHERE deleted = 0 GROUP BY customers.id, lastname, customers.name
--
Aleksander 'A.L.E.C' Machniak - http://alec.pl gg:2275252
LAN Management System Developer - http://lms.rulez.pl