diff options
Diffstat (limited to 'demos/time-tracker/protected/App_Code/ProjectDao.php')
-rw-r--r-- | demos/time-tracker/protected/App_Code/ProjectDao.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/demos/time-tracker/protected/App_Code/ProjectDao.php b/demos/time-tracker/protected/App_Code/ProjectDao.php index 416c6540..0a0771e3 100644 --- a/demos/time-tracker/protected/App_Code/ProjectDao.php +++ b/demos/time-tracker/protected/App_Code/ProjectDao.php @@ -62,10 +62,17 @@ class ProjectDao extends BaseDao return $sqlmap->queryForList('GetProjectMembers', $projectID);
}
- public function getAllProjects()
+ public function getAllProjects($sort='', $order='ASC')
{
$sqlmap = $this->getConnection();
- return $sqlmap->queryForList('GetAllProjects');
+ if($sort === '')
+ return $sqlmap->queryForList('GetAllProjects');
+ else
+ {
+ $param['sort'] = $sort;
+ $param['order'] = $order;
+ return $sqlmap->queryForList('GetAllProjectsOrdered', $param);
+ }
}
public function getProjectsByManagerName($manager)
|