mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
group by 절에 대응하도록 _getNavigationData() 함수 수정
by mooo 님 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6194 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c48cdf70a1
commit
d8d1854e71
7 changed files with 105 additions and 12 deletions
|
|
@ -588,13 +588,16 @@
|
|||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition);
|
||||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
$count_condition = count($output->groups) ? sprintf('%s group by %s', $condition, implode(', ', $output->groups)) : $condition;
|
||||
$total_count = $this->getCountCache($output->tables, $count_condition);
|
||||
if($total_count === false) {
|
||||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(', ', $table_list), implode(' ', $left_join), $count_condition);
|
||||
if (count($output->groups))
|
||||
$count_query = sprintf('select count(*) as count from (%s) xet', $count_query);
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
$this->putCountCache($output->tables, $condition, $total_count);
|
||||
$this->putCountCache($output->tables, $count_condition, $total_count);
|
||||
}
|
||||
|
||||
$list_count = $output->list_count['value'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue