* Fix bug of get dynamic count.
This commit is contained in:
+16
-1
@@ -1185,8 +1185,8 @@ class actionModel extends model
|
||||
->beginIF($period != 'all')->andWhere('date')->gt($begin)->fi()
|
||||
->beginIF($period != 'all')->andWhere('date')->lt($end)->fi()
|
||||
->beginIF($date)->andWhere('date' . ($direction == 'next' ? '<' : '>') . "'{$date}'")->fi()
|
||||
->beginIF($account != 'all')->andWhere('actor')->eq($account)->fi()
|
||||
->beginIF($beginDate)->andWhere('date')->ge($beginDate)->fi()
|
||||
->beginIF($account != 'all')->andWhere('actor')->eq($account)->fi()
|
||||
->beginIF($endDate)->andWhere('date')->le($endDate)->fi()
|
||||
->beginIF(is_numeric($productID))->andWhere('product')->like("%,$productID,%")->fi()
|
||||
->andWhere('1=1', true)
|
||||
@@ -2424,4 +2424,19 @@ class actionModel extends model
|
||||
$this->dao->delete()->from(TABLE_ACTIONLATEST)->where('date')->lt($lastMonth)->exec();
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dynamic count.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getDynamicCount()
|
||||
{
|
||||
$condition = $this->session->actionQueryCondition;
|
||||
$count = $this->dao->select('count(1) as count')->from(TABLE_ACTION)
|
||||
->where($condition)
|
||||
->fetch('count');
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user