I have a table, which is sorted out by
. I have 3 statuses = 0,1 and 2. I want to make some calculations when each status is finished.
Basically, PXPExcel overwrites the last row of each
category. According to the database there is: 4 rows with
, 1 row with
and 5 rows with
. I'm stuck on this part already for couple of days, so any help would be appreciated.
Here is my code:
Here is the export file output:
What I've already tried to do:
* Add +1 to each count so it could count last row as well.
* 1. Start adding +1 to each count outside the main loop.
* 2. $newCountOne = $countZero + ($countOne +1);
* 3. $newCountTwo = $newCountOne + ($countTwo +1);
* 4. if ( $loopCounter == ($countZero +1 ) )
* 5. To raise $key parameter in "total" row.
After asking question on SO, I managed to ugrade my code and it's look like this now, but it still not working as I expected.
This is how it's looks now - http://imgur.com/TTw1KIp
New code - http://pastebin.com/1HC5rgf7