How to print the value of COUNT sql statement

Hello,

my code is:

on the MODEL assuming I’m using a public variable public $totale;




public function searchReport1()

{




$criteria1= new CDbCriteria;

$criteria1->condition= "prj_start_date < '2010-03-01' AND prj_start_date >'2009-01-01' AND device_category_id='0' ";


$criteria1->select=" COUNT(*) as totale";




return new CActiveDataProvider(get_class($this), array(

'criteria'=>$criteria1,

));

}



ON TNE CONTROLLER




public function actionReport1()

{

$model=new Projects('searchReport1');

$model->unsetAttributes(); // clear any default values

if(isset($_GET['Projects']))

$model->attributes=$_GET['Projects'];


$this->render('report1',array(

'model'=>$model,

));

}



ON THE VIEW:




<?php $this->widget('zii.widgets.grid.CGridView', array(

'id'=>'projects-grid',

'dataProvider'=>$model->searchReport1(),

'filter'=>$model,

'columns'=>array(


'device_category_id',

array(

'header' => 'Totale',

'value' => '$totale',


),

/*'prj_start_date',

'prj_end_date', */




array(

'class'=>'CButtonColumn',

),

),

)); ?>



The field is empty . How can see the correct value of my query?

You already posted that question in another thread

there is no need to post the same question more than once…

sorry…but I don’r receive any help and I believe the old post was not clear. very sorry

Please, wrap your code with [ code ][ /code ] tags so we can read it :)