Cubrid에서 order by count와 같이 count라는 예약어가 사용되어서 쿼리 오류가 나는 문제를 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5019 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-11-28 02:47:30 +00:00
parent 3cb0a953b7
commit 29ff4bb4c4

View file

@ -586,7 +586,7 @@
if ($output->order) {
foreach($output->order as $key => $val) {
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$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 + 1, $list_count + $start_count);
@ -606,7 +606,7 @@
if($output->order) {
foreach($output->order as $key => $val) {
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$val[0], $val[1]);
}
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
}