1 -- AND t.deleted = 0 GROUP BY t.id ORDER BY latest DESC"; $result = $db -> query ($sql); $threads = []; while (($row = $result -> fetchArray (SQLITE3_ASSOC)) !== false) { $thread = new Dto\Thread; $thread -> id = $row['id']; $therad -> title = $row['title']; $thread -> explain = $row['explain']; $thread -> latest = $row['latest']; $threads[] = $thread; } return $therads; } public static function find ( int $id) : \Dto\Thread { ; } 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"); } }