include(SERVER_ROOT.'/classes/text.class.php'); $Text = new TEXT(true); G::$DB->query(" SELECT q.ID, q.Question, q.UserID, q.Date AS QuestionDate, ( SELECT COUNT(1) FROM staff_answers WHERE QuestionID = q.ID ) AS Responses FROM user_questions AS q JOIN staff_answers AS a ON q.ID = a.QuestionID GROUP BY q.ID ORDER BY Responses DESC"); $Questions = G::$DB->to_array(); View::show_header('Popular Questions', 'questions,bbcode'); ?>