From 445d6da9efc3bca359f7d4b4991a37a6c0aeb66f Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 9 Feb 2024 12:49:20 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=A1DAO=E3=82=87=E3=81=A3=E3=81=A8?= =?UTF-8?q?=E5=91=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index be7756b..e876354 100644 --- a/index.php +++ b/index.php @@ -31,14 +31,10 @@ $mysqli = set_mysql ('miteruzo_bbs'); $mysqli -> set_charset ('utf8'); -if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id = $thread")) +if ($row = Dao\Thread -> find ($thread)) { - $row = $result -> fetch_assoc (); - - $title = $row['title']; - $explain = $row['explain']; - - $result -> close (); + $title = $row -> title; + $explain = $row -> explain; } if (isset ($_GET['id'])