what does your table schema look like?
are you sure the DB is normalised?
like Kudose said, the problem is in your loop logic, you have the <TD> tag, then a while() loop, then when the loop is done, you close the <TD> tag.
this is going to create a cell, loop through the array echoing data, then close the cell. If you want each array element echo'd to be in its own cell, just change it to..
while ($r2 = mysql_fetch_array($queryPages))
{
echo "<td><li><a href=\"pages.php?pageID=\".$r2['pageID'].\"\">\" .$r2['pageTitle'].\ "</a></li></td>";
}
and remove the original <td> tags that are outside the loop.