I am in process of writing my own mod that will create an eliminations bracket for drag racing. I am currently having an issue pulling data from the server. My code is as follows:
PHP Code:
/**********************************************************************
* first start of the league do request for main page *
**********************************************************************/
if (!isset($_REQUEST['do']) && !isset($_REQUEST['do'])) {
$_REQUEST['do'] = "main_ladder";
}
/**********************************************************************
* main ladder page *
**********************************************************************/
if($_REQUEST['do']=="main_ladder"){
$navbits = array();
$navbits[$parent] = 'NitroSim Ladder Page';
$navbits = construct_navbits($navbits);
// output race name, date, and location
$race = $db->query("SELECT race_name FROM " . TABLE_PREFIX . "ns_races");
$location = $db->query("SELECT location FROM " . TABLE_PREFIX . "ns_races");
$date = $db->query("SELECT qual_date FROM " . TABLE_PREFIX . "ns_races");
$qualtime = $db->query("SELECT qual_time FROM " . TABLE_PREFIX . "ns_races");
$navbits = construct_navbits($navbits);
eval('$current .= "' . fetch_template('ladder_main') . '";');
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('ladder') . '");');
}
The output looks like the attached.
on the template I used $race, $location, $date, $qualtime for the appropriate positions. For some reason it only shows a resource id #. Anyone have any ideas?