How would i go about fetching the forumid the plugin is activated in and pass that variable into my query? Is this possible?
$listings = $vbulletin->db->query_read("SELECT title, threadid
FROM " . TABLE_PREFIX . "thread
WHERE forumid = 'variablehere'
ORDER BY rand() DESC
LIMIT 5
");
--------------- Added [DATE]1235378133[/DATE] at [TIME]1235378133[/TIME] ---------------
Got it working but just wanted to see if theres a better way to do this.
Is there a better way to do this?
Code:
$forumidtest = $foruminfo['forumid'];
$listings = $vbulletin->db->query_read("SELECT title, threadid
FROM " . TABLE_PREFIX . "thread
WHERE forumid = '$forumidtest'
ORDER BY rand() DESC
LIMIT 5
");