示例#1
0
 public function _beforeLoad()
 {
     $this->selectCurrency();
     $this->getSelect()->group('main_table.customer_id');
     $this->getSelect()->group('main_table.currency_id');
     $this->getSelect()->from(null, array("points_count" => "SUM(main_table.quantity)"));
     $this->getSelect()->from(null, array("points" => "CONCAT(SUM(main_table.quantity), ' ', currency_table.caption"));
     $this->getSelect()->from(null, array("last_changed_ts" => "MAX(main_table.creation_ts)"));
     return parent::_beforeLoad();
 }
示例#2
0
 /**
  * 
  * 
  * (overrides parent method)
  */
 public function _initSelect()
 {
     parent::_initSelect();
     $this->addFilter('reason_id', TBT_Rewardssocial_Model_Facebook_Like_Reason::REASON_TYPE_ID);
     return $this;
 }