request: new lire function: last / first

Edwin Groothuis edwin at mavetju.org
Sun Sep 15 00:51:24 CEST 2002


Greetings,

I would like to have a new function for groups: first and last,

    <lire:report-calc-spec>
     <lire:group sort="-stored_messages_total" limit="$users_to_show">
      <lire:field name="user"/>
      <lire:last name="stored_messages_total" field="stored_messages"/>
     </lire:group>
    </lire:report-calc-spec>

Last should return the value of the last occurance of a field.
First should return the value of the first occurance of a field.

For example, from a logfile which contains time/usernames and
data-stored-on-server, I want to have the list of top 10 people
with data on the server:

	time	username	data-stored-on-server
	00:00	edwin		100
	00:00	flacoste	25
	00:00	joostvb		50
	08:00	edwin		150
	08:00	flacoste	20
	08:00	joostvb		50
	16:00	edwin		150
	16:00	flacoste	20
	16:00	joostvb		57

So for the user `edwin', the function last would return 150, for
`joostvb' it would return 57 and fpr `flacoste' it would return 20.
For the function first the values returned would be 100, 50 and 25.

With this, there is a way of making a overview of how much is in
use at the end of the day. Or, what I need it for, it to know how
much messages are kept on a POP/IMAP server.

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.MavEtJu.org
edwin at mavetju.org    |    Weblog: http://www.mavetju.org/weblog/weblog.php 
bash$ :(){ :|:&};:   | Interested in MUDs? http://www.FatalDimensions.org/

-- 
To UNSUBSCRIBE, email to development-request at logreport.org with a subject of
"unsubscribe". Trouble? Send an email with subject "help" to
development-request at logreport.org



More information about the Development mailing list