スレッドの削除 DAO 追加
This commit is contained in:
+27
-2
@@ -6,8 +6,8 @@ namespace Dao;
|
|||||||
class
|
class
|
||||||
Thread
|
Thread
|
||||||
{
|
{
|
||||||
public function
|
public static function
|
||||||
get_threads (
|
fetch_threads (
|
||||||
SQLite3 $db)
|
SQLite3 $db)
|
||||||
: array
|
: array
|
||||||
{
|
{
|
||||||
@@ -49,5 +49,30 @@ Thread
|
|||||||
|
|
||||||
return $therads;
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user