Skip to content

Instantly share code, notes, and snippets.

@adilshahzad
Created November 21, 2013 09:05
Show Gist options
  • Save adilshahzad/7578229 to your computer and use it in GitHub Desktop.
Save adilshahzad/7578229 to your computer and use it in GitHub Desktop.
CActive
$dataProviderSt = new CActiveDataProvider('VehicleLogbookTbl', array(
'criteria'=>array(
'select'=>'t.vehId, SUM(t.finalReading - t.iniReading) AS TMilg',
'group'=>'project.id',
'condition'=>'t.vehId=10',
//'order'=>'create_time DESC',
'with'=>array('project'),
),
'pagination'=>false,
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment