summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/App_Code/ProjectDao.php
diff options
context:
space:
mode:
authorwei <>2006-07-23 11:11:21 +0000
committerwei <>2006-07-23 11:11:21 +0000
commitcbb7a11179b9c1c46e35f04d07d6386a44e400b2 (patch)
treedacfc2a5fdbcce3973e228eaca8002ff799e45d1 /demos/time-tracker/protected/App_Code/ProjectDao.php
parentc0d9d27f16bae2e428225302da144e9cc6d4adc8 (diff)
Update time-tracker demo and add simple dynamic SQLMap
Diffstat (limited to 'demos/time-tracker/protected/App_Code/ProjectDao.php')
-rw-r--r--demos/time-tracker/protected/App_Code/ProjectDao.php11
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)