Currently I have a criteria as shown below which finds average of column1 in my base table while joining with table1 and table2.
$criteria= new CDbCriteria;
$criteria->select = 'AVG(t.column1) as cc';
$criteria->group = 'table1.id';
$criteria->with = array('table1', 'table2');
How do I group by tabel1.id as well as table2.id in the above criteria?
seperate them by ,
$criteria->group = 'table1.id , table2.id';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With