|
|
@@ -125,11 +125,12 @@ abstract class Table {
|
|
|
//@param $count -- 0:返回列表 1:返回结果数量
|
|
|
//@param $page -- 当前第几页
|
|
|
//@param $pagesize -- 每页数量
|
|
|
- public function getList($filter = array(), $count = 0, $page = 0, $pagesize = 0){
|
|
|
+ public function getList($filter = array(), $count = 0, $page = 0, $pagesize = 0, $order = 0){
|
|
|
$where = $this->filterToWhere($filter);
|
|
|
+ $orderByStr = (empty($order) ? 'desc' : 'asc');
|
|
|
|
|
|
if($count == 0){//列表
|
|
|
- $sql = "select * from ". $this->table_fullname ." $where order by ".$this->table_id." desc";
|
|
|
+ $sql = "select * from ". $this->table_fullname ." $where order by ".$this->table_id." ".$orderByStr;
|
|
|
|
|
|
if($page > 0){//分页
|
|
|
$startrow = ($page - 1) * $pagesize;
|