/**
  * Get SQL for get record count
  *
  * Extra GROUP BY strip added.
  *
  * @return \Magento\Framework\DB\Select
  */
 public function getSelectCountSql()
 {
     $countSelect = parent::getSelectCountSql();
     $countSelect->reset(\Magento\Framework\DB\Select::GROUP);
     return $countSelect;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getSelectCountSql()
 {
     $countSelect = parent::getSelectCountSql();
     $countSelect->reset(\Magento\Framework\DB\Select::COLUMNS);
     $countSelect->columns('COUNT(DISTINCT main_table.attribute_id)');
     return $countSelect;
 }
 /**
  * Get SQL for get record count.
  * Extra GROUP BY strip added.
  *
  * @return \Magento\Framework\DB\Select
  */
 public function getSelectCountSql()
 {
     $countSelect = parent::getSelectCountSql();
     $countSelect->reset(\Zend_Db_Select::GROUP);
     return $countSelect;
 }
Пример #4
0
 /**
  * Returns select count sql
  *
  * @return string
  */
 public function getSelectCountSql()
 {
     $select = parent::getSelectCountSql();
     $countSelect = clone $this->getSelect();
     $countSelect->reset(\Magento\Framework\DB\Select::HAVING);
     return $select;
 }