public function deleteById($id) { if ($id == null) { return false; } $stmt = \OCP\DB::prepare('DELETE FROM ' . self::tableName . ' WHERE id = ? AND user_id = ?'); $result = $stmt->execute(array($id, $this->userid)); $itemMapper = new ItemMapper(); //TODO: handle the value that the execute returns $itemMapper->deleteAll($id); return true; }