Hi, I think I missed something with the logic as it breaks the whole website. Perhaps if I show the code in context (may need a premiere ticket which I am in urgent need asap). but can you at least look at the code below to see at least your solutions fits in what I want to do?
<?php
$rsParentCategories = new WA_MySQLi_RS("rsParentCategories",$ecartdb,0);
$rsParentCategories->setQuery("SELECT * from categories LEFT OUTER JOIN categories AS selfJoinedChildren ON categories.CategoryID = selfJoinedChildren.CategoryParentID");
$rsParentCategories->execute();
?>
then further down....
<?php
while(!$rsParentCategories->atEnd()) {
?>
<li><a href="../category.php?Department=<?php echo($rsParentCategories->getColumnVal("CategoryLink")); ?>"><?php echo($rsParentCategories->getColumnVal("CategoryName")); ?></a>
<ul class="dropdown">
<?php
while(!$rsParentCategories->atEnd()) {
?>
<li><a href="../category.php?Department=Accessories&Category=<?php echo($rsAccessories->getColumnVal("CategoryLink")); ?>"><?php echo($rsAccessories->getColumnVal("CategoryName")); ?></a> </li>
<?php
$rsParentCategories->moveNext();
}
$rsParentCategories->moveFirst(); //return RS to first record
?>
</ul>
</li>
<?php
$rsParentCategories->moveNext();
}
$rsParentCategories->moveFirst(); //return RS to first record
?>
NOTE: I need to adjust the code above (../category.php?Department=Accessories&Category=) and remove Accessories as this needs to be a dynamic binding.
But can you see what I am trying to do here?
Chris