diff options
author | wei <> | 2006-07-28 12:32:01 +0000 |
---|---|---|
committer | wei <> | 2006-07-28 12:32:01 +0000 |
commit | 623447ffea7a49359c773a0bc3a851397885f319 (patch) | |
tree | 93676acdeea5697dd00fb10d0eb70948901b549e /demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php | |
parent | fbf05a159bc1a688940c16dc304eaaf140188b01 (diff) |
Add sqlite support for time-tracker.
Diffstat (limited to 'demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php')
-rw-r--r-- | demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php b/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php new file mode 100644 index 00000000..7207ed47 --- /dev/null +++ b/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php @@ -0,0 +1,38 @@ +<?php
+
+class TimeEntryDao extends BaseDao
+{
+ public function addNewTimeEntry($entry)
+ {
+ $sqlmap = $this->getConnection();
+ $sqlmap->insert('AddNewTimeEntry', $entry);
+ }
+
+ public function getTimeEntryByID($entryID)
+ {
+ $sqlmap = $this->getConnection();
+ return $sqlmap->queryForObject('GetTimeEntryByID', $entryID);
+ }
+
+ public function deleteTimeEntry($entryID)
+ {
+ $sqlmap = $this->getConnection();
+ $sqlmap->delete('DeleteTimeEntry', $entryID);
+ }
+
+ public function getTimeEntriesInProject($username, $projectID)
+ {
+ $sqlmap = $this->getConnection();
+ $param['username'] = $username;
+ $param['project'] = $projectID;
+ return $sqlmap->queryForList('GetAllTimeEntriesByProjectIdAndUser', $param);
+ }
+
+ public function updateTimeEntry($entry)
+ {
+ $sqlmap = $this->getConnection();
+ $sqlmap->update('UpdateTimeEntry', $entry);
+ }
+}
+
+?>
\ No newline at end of file |