13 Lip
2004
13 Lip
'04
21:02
Przemek SAKO Galczewski wrote:
! $dbq = $dbase->prepare("SELECT userid, SUM(uprate) AS uprate, SUM(downrate) AS downrate FROM assignments, users, tariffs WHERE users.id = userid AND deleted = 0 AND tariffid = tariffs.id AND (datefrom <= $utsfmt OR datefrom = 0) AND (dateto > $utsfmt OR dateto = 0) AND (datefrom <= dateto OR dateto = 0) GROUP BY userid"); $dbq->execute();
dzieki, ale zdaje sie, ze wystarczy, tak jak jest w lms-payments: WHERE users.id = userid AND deleted = 0 AND tariffid = tariffs.id AND (datefrom <= $utsfmt OR datefrom = 0) AND (dateto > $utsfmt OR dateto = 0) GROUP BY userid
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg-2275252
Lan Management System Developer http://lms.rulez.pl