mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Cubrid list_order 적용
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7788 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
08453d43e2
commit
4e0cc19d2b
1 changed files with 24 additions and 0 deletions
|
|
@ -797,6 +797,18 @@
|
|||
return ($this->_getNavigationData($table_list, $columns,
|
||||
$left_join, $condition, $output));
|
||||
|
||||
if($output->order) {
|
||||
$conditions = $this->getConditionList($output);
|
||||
if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$col = $val[0];
|
||||
if(!in_array($col, array('list_order','update_order'))) continue;
|
||||
if($condition) $condition .= sprintf(' and %s < 2100000000 ', $col);
|
||||
else $condition = sprintf(' where %s < 2100000000 ', $col);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$query = sprintf ("select %s from %s %s %s", $columns,
|
||||
implode (',',$table_list), implode (' ',$left_join),
|
||||
$condition);
|
||||
|
|
@ -1000,6 +1012,18 @@
|
|||
if ($page > $total_page) $page = $total_page;
|
||||
$start_count = ($page - 1) * $list_count;
|
||||
|
||||
if($output->order) {
|
||||
$conditions = $this->getConditionList($output);
|
||||
if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$col = $val[0];
|
||||
if(!in_array($col, array('list_order','update_order'))) continue;
|
||||
if($condition) $condition .= sprintf(' and %s < 2100000000 ', $col);
|
||||
else $condition = sprintf(' where %s < 2100000000 ', $col);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$query = sprintf ("select %s from %s %s %s", $columns,
|
||||
implode (',', $table_list), implode(' ', $left_join), $condition);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue