summaryrefslogtreecommitdiff
path: root/src/Bridge.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bridge.php')
-rw-r--r--src/Bridge.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index 8b04f03..ba6ccc8 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -99,6 +99,18 @@ class Bridge {
}
}
+ public function unregisterPost($postId) {
+ throw_if_null($postId);
+
+ $sql = 'DELETE FROM posts WHERE post_id = ' . $postId;
+
+ $count = $this->db->exec($sql);
+
+ if ($count != 1) {
+ throw new Exception('Failed to delete message id: ' . $messageId);
+ }
+ }
+
protected function get_exactly_one_row($sql) {
$result = $this->db->query($sql);