mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
#18686558 수정. : ㄴ띠ㄸㅊㅆ 쿼리시 column 부분에 function(table.column) 형식의 파라미터가 주어질 시 이를 잘못 처리하는 문제.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7297 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc2fa97e38
commit
c51304406f
1 changed files with 15 additions and 3 deletions
|
|
@ -642,13 +642,25 @@
|
|||
$column_list[] = $name;
|
||||
} elseif(strpos($name,'.')===false && strpos($name,'(')===false) {
|
||||
$name = sprintf($click_count,$name);
|
||||
if($alias) $column_list[] = sprintf('"%s" as %s', $name, $alias);
|
||||
if ($alias) $column_list[] = sprintf('"%s" as %s', $name, $alias);
|
||||
else $column_list[] = sprintf('"%s"',$name);
|
||||
} else {
|
||||
if(strpos($name,'.')!=false) {
|
||||
list($prefix, $name) = explode('.',$name);
|
||||
$prefix = sprintf('"%s"',$prefix);
|
||||
$name = ($name == '*') ? $name : sprintf('"%s"',$name);
|
||||
if (strpos ($prefix, "(")) {
|
||||
$tmpval = explode ("(", $prefix);
|
||||
$tmpval[1] = sprintf ('"%s"', $tmpval[1]);
|
||||
$prefix = implode ("(", $tmpval);
|
||||
$flag_of_function = true;
|
||||
}
|
||||
else $prefix = sprintf('"%s"',$prefix);
|
||||
if ($flag_of_function === true) {
|
||||
$tmpval = explode (")", $name);
|
||||
$tmpval[0] = sprintf ('"%s"', $tmpval[0]);
|
||||
$name = implode (")", $tmpval);
|
||||
$flag_of_function = false;
|
||||
}
|
||||
else $name = ($name == '*') ? $name : sprintf('"%s"',$name);
|
||||
|
||||
$column_list[] = sprintf($click_count,sprintf('%s.%s', $prefix, $name)) . ($alias ? sprintf(' as %s',$alias) : '');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue