Changeset 1770 for pykota/trunk
- Timestamp:
- 10/04/04 18:11:38 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r1769 r1770 22 22 # 23 23 # $Log$ 24 # Revision 1.51 2004/10/04 16:11:38 jalet 25 # Now outputs page counters when dumping user groups quotas 26 # 24 27 # Revision 1.50 2004/10/04 16:01:15 jalet 25 28 # More complete dumps for groups and groups quotas … … 133 136 def extractGpquotas(self) : 134 137 """Extracts all grouppquota records.""" 135 result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.* FROM groups,printers,grouppquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid ORDER BY grouppquota.id ASC")138 result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.*,sum(pagecounter) AS pagecounter,sum(lifepagecounter) AS lifepagecounter FROM groups,printers,grouppquota,userpquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid AND userpquota.printerid=grouppquota.printerid AND userpquota.userid IN (SELECT userid FROM groupsmembers WHERE groupsmembers.groupid=grouppquota.groupid) GROUP BY grouppquota.id,grouppquota.groupid,grouppquota.printerid,grouppquota.softlimit,grouppquota.hardlimit,grouppquota.datelimit,groups.groupname,printers.printername ORDER BY grouppquota.id") 136 139 return self.prepareRawResult(result) 137 140