Friday 06 February 2004 8:21:22 am
Hi all I am making overall statistics on my users, the statistics are grouped by various status in several EZSelection data types each user has. For instance total number of articles posted grouped by sex. My algorithm for doing this is basically.
Fetch the attribute (EZSelection) Fetch the attribute options
Section loop for each attribute.option
Fetch tree_count for each option set for the users
Calcualte and print statistics End section
This is working fine, except that there seems to be an HOLE between 0 and 2 in the users selections, 1 is always missing in the user attributes. Example: an EZSelection with options: Class of, options: 1999,2000,2001. Then attribute options are (fetched from the class):
0 -> 1999
1 -> 2000 2 -> 2001
HOWEVER, EZ selection in the users has!
0 -> 1999
2 -> 2000 3 -> 2001 Is this a bug or is it me
Cheers Tore UPDATE:
Searching the database "ezcontentclass_attribute.data_text5" I find:
<?xml version="1.0" encoding="UTF-8"?>
<ezselection>
<options>
<option id="0"
name="Male" />
<option id="2"
name="Female" />
</options> </ezselection> The jump from 0 to 2 is consistent in all EZSelections, Could someone please tell me if this is a bug or if it is there for a reason. Am I doing my statistics wrongly ?
Cheers Tore
|