add "limit" navigation control to xml query and db classes

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8395 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
mosmartin 2011-05-25 11:32:54 +00:00
parent 4d2d18b53b
commit 750733936b
6 changed files with 65 additions and 8 deletions

View file

@ -795,9 +795,13 @@
}
$orderBy = substr($orderBy, 0, -2);
}
$query = $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy;
$limit = '';
if(count($output->limit) > 0){
$limit = 'limit ';
$limit .= $output->limit->toString();
}
$query = $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
//$query = sprintf ("select %s from %s %s %s %s", $columns, implode (',',$table_list), implode (' ',$left_join), $condition, //$groupby_query.$orderby_query);
//$query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf (' '.$this->comment_syntax, $this->query_id):'';