[Zope-CMF] sum up member properties for specific time period
Dieter Maurer
dieter@handshake.de
Tue, 3 Jun 2003 20:26:28 +0200
Norman Khine wrote at 2003-6-2 19:15 +0100:
> you're saying that i should store these data within a database rather than
> the ZODB? or am i wrong?
No, I do not (want to) say that.
Instead, I mean: you must store the historical data somewhere (this
can be the ZODB or a relational database or a file).
While historical data is maintained by an undoable storage (until packing
time), it is difficult to access it and it is lost before the
packing time.
> what i have is that i have setup some additional properties to the Member on
> the CMF, this includes Join_Date, Office_Location etc, so when a user joins
> the form registers the Date & Time and also it asks them to select from a
> drop-down box the Office_Location(this is stored as 1, 2, 3 - where 1 is the
> Head Office, 2 is Editorial, and 3 is Developmet) - all this is stored on
> the ZODB and if I use the how-to http://www.zopelabs.com/cookbook/1048010784
> i can see all the data that I need to analyse, BUT don't have the know-how
> of how to achieve this ;^(
Either, you use the ZCatalog (as someone else already suggested;
see the Zope Book (2.6 edition - online) for details)
or you use a Python Script, enumerate all members and sort
them into bins (categories) as required.
> also, looking at the http://www.zopelabs.com/cookbook/1054497272 we can
> count how many members we have? so isn't there a way to group these by
> Join_Date property?
Do it with a Python Script (Zope does not have something like the
"group by" clause of SQL).
Dieter