Im having problems looping through my database. Im useing fast template and i cant get it to loop through and add more than one item. here is what i have...
$menu = "SELECT * FROM menu_left ORDER BY menu_order";
if ($complete != 1)
$menu .= " LIMIT 20";
$menu_left = mysql_query($menu);
while ($menurow = mysql_fetch_array($menu_left)) {
if ($menurow['menu_show'] == 1) {
$menu_link = $menurow['menu_link'];
$menu_name = $menurow['menu_name'];
} else {
echo "";
};
}
$tpl->assign(array(
'menu_link' => $menu_link,
'menu_name' => $menu_name,
)
);
then i have in the template...
<a href="{menu_link}.php">{menu_name}</a>
can you help me with this one?
$menu = "SELECT * FROM menu_left ORDER BY menu_order";
if ($complete != 1)
$menu .= " LIMIT 20";
$menu_left = mysql_query($menu);
while ($menurow = mysql_fetch_array($menu_left)) {
if ($menurow['menu_show'] == 1) {
$menu_link = $menurow['menu_link'];
$menu_name = $menurow['menu_name'];
} else {
echo "";
};
}
$tpl->assign(array(
'menu_link' => $menu_link,
'menu_name' => $menu_name,
)
);
then i have in the template...
<a href="{menu_link}.php">{menu_name}</a>
can you help me with this one?