vietfancy
11-22-2009, 08:38 AM
<?php
// Get Schedule
$mon = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "schedule WHERE day like '%Monday%' ORDER BY time");
$schedule_mon = "<b>$mon[time]</b> - <b>$mon[ampm]</b> - <b>$mon[class]</b> - <b>$mon[level]</b> - <b>$mon[instructor]</b>";
// end Get Schedule
// ###### TEMPLATE IS BEING RENDERED ######
$templater = vB_Template::create('schedule');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
$templater->register('schedule_mon', $schedule_mon);
print_output($templater->render());
?>
I used this code in the template and it only shows 1 row from the database. Did I do anything wrong?
{vb:raw schedule_mon}
Image:
https://vborg.vbsupport.ru/attachment.php?attachmentid=106533&stc=1&d=1258886235
// Get Schedule
$mon = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "schedule WHERE day like '%Monday%' ORDER BY time");
$schedule_mon = "<b>$mon[time]</b> - <b>$mon[ampm]</b> - <b>$mon[class]</b> - <b>$mon[level]</b> - <b>$mon[instructor]</b>";
// end Get Schedule
// ###### TEMPLATE IS BEING RENDERED ######
$templater = vB_Template::create('schedule');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
$templater->register('schedule_mon', $schedule_mon);
print_output($templater->render());
?>
I used this code in the template and it only shows 1 row from the database. Did I do anything wrong?
{vb:raw schedule_mon}
Image:
https://vborg.vbsupport.ru/attachment.php?attachmentid=106533&stc=1&d=1258886235