mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-20 19:02:14 +09:00
1. r6784에 추가 수정.(#18298617 관련)
2. DBCubrid::_executeSelect 의 order by 절 관련 전처리 부분 불필요한 조건문 및 잘못된 조건문 간소화/수정. git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6787 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
307d78f3f4
commit
5f74042ff9
1 changed files with 19 additions and 29 deletions
|
|
@ -619,19 +619,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]);
|
||||
}
|
||||
}
|
||||
$index_list[] = sprintf('%s %s', $val[0]=='count'?'"count"':$val[0], $val[1]);
|
||||
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]);
|
||||
}
|
||||
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);
|
||||
|
|
@ -651,19 +647,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]);
|
||||
}
|
||||
}
|
||||
$index_list[] = sprintf('%s %s', $val[0]=='count'?'"count"':$val[0], $val[1]);
|
||||
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]);
|
||||
}
|
||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||
}
|
||||
|
|
@ -794,9 +786,7 @@
|
|||
$val[0] = implode ('.', $tmpval);
|
||||
}
|
||||
elseif (strpos ($val[0], '(')) $val[0] = $val[0];
|
||||
else {
|
||||
$val[0] = sprintf ('"%s"', $val[0]);
|
||||
}
|
||||
else $val[0] = sprintf ('"%s"', $val[0]);
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
}
|
||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue