Re: Patch do bledu w LMS-MGC - nieprawidlowe pobieranie predkosci z bazy
Hello A.L.E.C,
Tuesday, July 13, 2004, 9:02:41 PM, you wrote:
ALEC> 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();
ALEC> dzieki, ale zdaje sie, ze wystarczy, tak jak jest w lms-payments: ALEC> WHERE users.id = userid AND deleted = 0 AND tariffid = ALEC> tariffs.id AND (datefrom <= $utsfmt OR datefrom = 0) AND (dateto > ALEC> $utsfmt OR dateto = 0) GROUP BY userid
mozna i tak, sorry, ale nie optymalizowalem tego i nie zagladalem do payments, po prostu poprawilem buga analogicznie do skladni wykorzystywanej w mgc.
najwazniejsze, ze jeden bug mniej :)
uczestnicy (1)
-
Przemek SAKO Galczewski