[TYPO3-english] Re: Re: Show count of users in usergroup

Nemanja Todic tntprograms at gmail.com
Sun Dec 29 16:46:03 CET 2013


>> he structure is basically this " usergroup id | start date | end date | "
IMO the developer of the ext. that introduced this "timed" feature did a bad job by storing data in such format.

Because of such structure, there are two options - to mysql create stored procedure that will handle this on DB level or to create userFunc that will:
1. Select all users from DB (I hope there are not so many of them in DB, because it can hurt performances). We need only uid and and this timed field
2. Loop through all of the rows and split "timed field" by |. Then it will be easy to see whether this record should be counted or not.
3. as the result, userFunc will return total count.

Hope this will help you solve the problem


More information about the TYPO3-english mailing list