7 Sie
2007
7 Sie
'07
15:37
2007/8/7, Wojciech Ziniewicz wojciech.ziniewicz@gmail.com:
Dla potomnych - ID klientów z przeterminowanymi umowami itd.. (sami klienci, nie poszczegolne komputery)
SELECT DISTINCT customers.id FROM customers, nodes WHERE customers.id = ownerid AND deleted = 0 AND access = 1 AND NOT EXISTS (SELECT 1 FROM assignments WHERE customerid = customers.id AND (datefrom <= UNIX_TIMESTAMP() OR datefrom = 0) AND (dateto >= UNIX_TIMESTAMP() OR dateto = 0) AND (tariffid != 0 OR liabilityid != 0) )
--
Wojciech Ziniewicz
Unix SEX :{look;gawk;find;sed;talk;grep;touch;finger;find;fl
ex;unzip;head;tail; mount;workbone;fsck;yes;gasp;fsck;more;yes;yes;eje
ct;umount;makeclean; zip;split;done;exit:xargs!!;)}
_______________________________________________
lms mailing list
lms@lists.lms.org.pl
http://lists.lms.org.pl/mailman/listinfo/lms