スレッドの削除 DAO 追加

This commit is contained in:
2024-02-07 12:50:57 +09:00
parent efa4ceedf8
commit 34859e55b3
+27 -2
View File
@@ -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");
}
}