From 34859e55b30de2db5765fcfe92870dd0f2350f0e Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 7 Feb 2024 12:50:57 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89=E3=81=AE?= =?UTF-8?q?=E5=89=8A=E9=99=A4=20DAO=20=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daos/thread.php | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/daos/thread.php b/daos/thread.php index dd8c0d8..3aff455 100644 --- a/daos/thread.php +++ b/daos/thread.php @@ -6,8 +6,8 @@ namespace Dao; class Thread { - public function - get_threads ( + public static function + fetch_threads ( SQLite3 $db) : array { @@ -49,5 +49,30 @@ Thread return $therads; } + + + public static function + create_thread ( + SQLite3 $db, + string $title, + string $explain) + : void + { + ; + } + + + public static function + delete_thread ( + SQLite3 $db, + int $id) + : void + { + $db -> query (" + DELETE FROM + threads + WHERE + id = $id"); + } }