XF 1.5 Finding latest threads

abdfahim

Well-known member
If I want to get a list of 10 latest, 10 most viewed and 10 most replied thread across the whole board, do I need to build a SQL query like below or I can use an existing class?

SQL:
$threads = $db->fetchAll(" SELECT xf_thread.thread_id ...............");
 
Top