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'])