ahmed201
(Rifajas)
August 15, 2013, 3:17pm
1
dear friends I want to display the total number of medicines does the order has in the grid view using active data provider… like this
$data->totalMedicines
but I got the error
I count this value in criteria as
…
‘select’=>’ count(medicine) AS totalMedicines’,
…
help me
lalzada
(Lalzadamohmand)
August 15, 2013, 4:29pm
2
Hello Dear !!!
Just define " totalMedicines " property in ur Model Class like this
public $totalMedicines;
ahmed201
(Rifajas)
August 16, 2013, 6:00am
4
I saw your reply…,
I did like this in the criteria and pass it to cactivedataprovider except I dont have such a variable like the above
$TotalDt is this really works? does the summed value stored to this variable? …
Yes in my provious comment it’s work fine…please try it…and stored the value on varible so please wirte a query and pass the criteria…so it’s work fine and return the $TotalDt
for example…
$sumDT = DayaTampungS1::model()->findAll($criteria);
print_r(count($sumDT));