@@ 66-74 (lines=9) @@ | ||
63 | * @return bool |
|
64 | * @throws Exception if feed couldn't be deleted |
|
65 | */ |
|
66 | public function deleteById($id){ |
|
67 | ||
68 | $database = Database::openConnection(); |
|
69 | $database->deleteById($this->table, $id); |
|
70 | ||
71 | if($database->countRows() !== 1){ |
|
72 | throw new Exception ("Couldn't delete news feed"); |
|
73 | } |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * get errors |
@@ 50-58 (lines=9) @@ | ||
47 | return true; |
|
48 | } |
|
49 | ||
50 | public function delete($id){ |
|
51 | ||
52 | $database = Database::openConnection(); |
|
53 | $database->deleteById("todo", $id); |
|
54 | ||
55 | if($database->countRows() !== 1){ |
|
56 | throw new Exception ("Couldn't delete todo"); |
|
57 | } |
|
58 | } |
|
59 | } |