mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
1. #18298617 수정,
2. DBCubrid 클래스의 _executeSelect 함수에서 order by 절에 주어지는 인자가 잘못 생성될 수 있는 문제 수정.(count 관련)(검토 필요함.) git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6784 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c4352f4ec2
commit
18a58313e5
1 changed files with 11 additions and 13 deletions
|
|
@ -631,7 +631,7 @@
|
|||
$val[0] = sprintf ('"%s"', $val[0]);
|
||||
}
|
||||
}
|
||||
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$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);
|
||||
|
|
@ -663,7 +663,7 @@
|
|||
$val[0] = sprintf ('"%s"', $val[0]);
|
||||
}
|
||||
}
|
||||
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$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);
|
||||
}
|
||||
|
|
@ -787,17 +787,15 @@
|
|||
|
||||
if ($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
if ($val[0] != 'count') {
|
||||
if (strpos ($val[0], '.')) {
|
||||
$tmpval = explode ('.', $val[0]);
|
||||
$tmpval[0] = sprintf ('"%s"', $tmpval[0]);
|
||||
$tmpval[1] = sprintf ('"%s"', $tmpval[1]);
|
||||
$val[0] = implode ('.', $tmpval);
|
||||
}
|
||||
elseif (strpos ($val[0], '(')) $val[0] = $val[0];
|
||||
else {
|
||||
$val[0] = sprintf ('"%s"', $val[0]);
|
||||
}
|
||||
if (strpos ($val[0], '.')) {
|
||||
$tmpval = explode ('.', $val[0]);
|
||||
$tmpval[0] = sprintf ('"%s"', $tmpval[0]);
|
||||
$tmpval[1] = sprintf ('"%s"', $tmpval[1]);
|
||||
$val[0] = implode ('.', $tmpval);
|
||||
}
|
||||
elseif (strpos ($val[0], '(')) $val[0] = $val[0];
|
||||
else {
|
||||
$val[0] = sprintf ('"%s"', $val[0]);
|
||||
}
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue