$replycounts = array(); // Edit the following line to contain all threadids you wish to include. $threadids = '674,4563,4895,7894'; $threads= $vbulletin->db->query_read("SELECT thread.* FROM " . TABLE_PREFIX . "thread AS thread WHERE threadid IN (" . $threadids . ") "); while ($thread = $db->fetch_array($threads)) { $replycounts[$thread['threadid']] = $thread['replycount']; }