HI,
‘shopvisituser’ => array(self::HAS_MANY, ‘ShopVisituser’, array(‘merchant_id’ => ‘uid’)),
In these relation I want to do Group by in User_id Shopvisit How to write Group by in these above coding?
HI,
‘shopvisituser’ => array(self::HAS_MANY, ‘ShopVisituser’, array(‘merchant_id’ => ‘uid’)),
In these relation I want to do Group by in User_id Shopvisit How to write Group by in these above coding?
Have a look at this:
http://www.yiiframework.com/doc/guide/1.1/en/database.arr#relational-query-options