Could someone please help fix the below? It is returning only one row. Thank you
PHP Code:
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$postinfos = $DB_site->query("SELECT * FROM post WHERE award=1 and visible=1 ORDER BY dateline DESC");
$award = array();
while ($postinfo = $DB_site->fetch_array($postinfos))
{
exec_switch_bg();
$postid = $postinfo['postid'];
$tid = $postinfo['threadid'];
$uid = $postinfo['userid'];
$date = $postinfo['dateline'];
$username = $postinfo['username'];
$title = $postinfo['title'];
mysql_free_result($postinfos);
}
$threads = $DB_site->query("SELECT * FROM thread WHERE threadid=$tid");
$threadid = array();
while ($threadinfo = $DB_site->fetch_array($threads))
{
exec_switch_bg();
$ttitle = $threadinfo['title'];
$forums = $threadinfo['forumid'];
mysql_free_result($threads);
}
$theforums = $DB_site->query("SELECT * FROM forum WHERE forumid=$forums");
$forumid = array();
while ($foruminfo = $DB_site->fetch_array($theforums))
{
exec_switch_bg();
$forum = $foruminfo['title'];
mysql_free_result($theforums);
}
construct_forum_jump();
$navbits = array();
$navbits[$parent] = 'Editor\'s Pick';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('pick') . '");');