group header count

dream

Member
group header count appears to be in error.
it's ok if there is one or more child rows but it shows (1) if there's no child.
(i saw one closely related thread but it didn't touch on this i don't think.)
 
i see what's happening: the grouped row is made up of joined data so even if the parent has no child, the count is one, for the parent. is there any way of only counting child rows?
(where is the code for this please? don't know if i can change it but i would have a look.)
 
Hi dream, Do you speack about list view with repeat group on it, and groupe by a master entrie, assume like the tutorial and the onetomany sample (classe/students).
If you have a left join you ask to the list all entries from left table even if no entrie in the right table, so count = 1 even if no entrie at the right ( 1 = the left group itself).... Like I anderstand the join.
But if you make the join like inner only entries matching this : the Left with Right table's row only if the join column (the column "to" into the join's configuration) have matchs.

Just take 5 minutes and look on this :
http://www.w3schools.com/sql/sql_join.asp
the 3-4 pages on the Join explanation are very helpfull !

And let us know ;)
 
i think you get my meaning.
i understand joins, but i would still like to see a count of joined/child rows only.

why is it that when there is one child row the count is 1, and when there is no child row the count is still 1?
 
because as you described we count on the list's main data, so even if the row has no joined records its still counts as '1'
You can see this in the bootstrap template - components/com_fabrik/views/list/tmpl/bootstrap/default.php

PHP:
<?php echo $this->grouptemplates[$groupedby]; ?> ( <?php echo count($group)?> )
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top