페이징 버그 수정:inst_num>groupby_num>orderby_num() 단계적 적용

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1942 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
rokmcssu 2007-07-16 05:01:00 +00:00
parent c2fab6070f
commit c399c27605

View file

@ -575,14 +575,23 @@
if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups));
if($output->order) {
foreach($output->order as $key => $val) {
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
}
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
if ($output->order) {
foreach($output->order as $key => $val) {
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
}
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
$query = sprintf('%s for orderby_num() between %d and %d', $query, $start_count, $list_count);
}
else {
if (count($output->groups))
$query = sprintf('%s having groupby_num() between %d and %d', $query, $start_count, $list_count);
else {
if ($condition)
$query = sprintf('%s and inst_num() between %d and %d', $query, $start_count, $list_count);
else
$query = sprintf('%s where inst_num() between %d and %d', $query, $start_count, $list_count);
}
}
$query = sprintf('%s for orderby_num() between %d and %d', $query, $start_count, $list_count);
$result = $this->_query($query);
if($this->isError()) {