<?PHP class news extends punRoot { public function get_latest_news() { return news::query("SELECT * FROM ".$this->db->prefix."topics AS t LEFT JOIN ".$this->db->prefix."posts AS p ON t.id = p.topic_id WHERE t.forum_id = '1' GROUP BY t.id ORDER BY t.posted DESC LIMIT 10"); } }