本文整理汇总了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::getSelectCountSql方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::getSelectCountSql方法的具体用法?PHP AbstractCollection::getSelectCountSql怎么用?PHP AbstractCollection::getSelectCountSql使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
的用法示例。
在下文中一共展示了AbstractCollection::getSelectCountSql方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSelectCountSql
/**
* get select count sql
*
* @return \Zend_Db_Select
*/
public function getSelectCountSql()
{
if (!$this->_countSelect instanceof \Zend_Db_Select) {
$this->setSelectCountSql(parent::getSelectCountSql());
}
return $this->_countSelect;
}
示例2: getSelectCountSql
/**
* 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;
}
示例3: getSelectCountSql
/**
* Returns select count sql
*
* @return string
*/
public function getSelectCountSql()
{
$select = parent::getSelectCountSql();
$countSelect = clone $this->getSelect();
$countSelect->reset(\Zend_Db_Select::HAVING);
return $select;
}
示例4: getSelectCountSql
/**
* @inheritdoc
*/
public function getSelectCountSql()
{
$countSelect = parent::getSelectCountSql();
$countSelect->reset(\Zend_Db_Select::COLUMNS);
$countSelect->columns('COUNT(DISTINCT main_table.attribute_id)');
return $countSelect;
}
示例5: getSelectCountSql
/**
* 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;
}