From 623447ffea7a49359c773a0bc3a851397885f319 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 28 Jul 2006 12:32:01 +0000 Subject: Add sqlite support for time-tracker. --- .../protected/App_Code/Dao/TimeEntryDao.php | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php (limited to 'demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php') 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 @@ +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 -- cgit v1.2.3