Following is inside an action method,
$dataProvider=new CActiveDataProvider('Tips', array( 'criteria'=>array('order'=>'create_time DESC','limit'=>1) ));
The order of the output is descending but 'limit'? It just does not work. I'm expecting to get a single result after putting 'limit'->1 and yet it gives me data from all the rows.
The view file corresponding to this contains,
<?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$dataProvider, 'summaryText'=>'', 'itemView'=>'_tips', )); ?>
Really not able to understand what is going wrong here. Kindly help.