mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +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
|
|
@ -774,6 +774,23 @@ class DBPostgresql extends DB
|
|||
{
|
||||
require_once (_XE_PATH_ . 'classes/page/PageHandler.class.php');
|
||||
|
||||
/*
|
||||
// group by 절이 포함된 SELECT 쿼리의 전체 갯수를 구하기 위한 수정
|
||||
// 정상적인 동작이 확인되면 주석으로 막아둔 부분으로 대체합니다.
|
||||
//
|
||||
$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, $count_condition, $total_count);
|
||||
}
|
||||
*/
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(',', $table_list),
|
||||
implode(' ', $left_join), $condition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue