i have a links system in my database
LINKS table... it contains all the links, it has a SECTION_ID field.
whcih links to the SECTION table.
the section ID in the LINKS table has an ID corrensponding to each section in the SECTION table.
ive used php to grab it onto my webpage
// Fetch the Navigation
$section_query = mysql_query('SELECT * FROM sections ORDER BY position', DB);
$nav = '';
while ($section = mysql_fetch_assoc($section_query)) {
echo $section['name'];
$links_query = mysql_query('SELECT * FROM links WHERE section_id='.$section['id'].' ORDER BY position');
while ($links = mysql_fetch_assoc($links_query)) {
$nav .= '<br>';
$nav .= '<div class="menutop">'.$section['name'].'</div>
<br />
<div class=\"menubot\">
<ul style=\"margin:0px 0px 0px 15px;padding:0px 0px 0px 0px;\">
<a href="'.$links['link'].'">'.$links['title'].'</a>'."
</ul></div><br />";
}
}
i can then echo $nav this to display it where i want on page.
but its giving each LINK a SECTION HEADER instead of placing all the links under the header once.
you can see wot i mean here:
http://mforcer.bounceme.net:1986/v2/