This is so basic I hate to even ask but I can't see what I've done wrong.
I know the query is correct because I used it in the database so I'm missing something in the MoveNext function. It must not be as simple I want it to be.
Instead of the 4 different buttons, it gives the same button 4 times
Code:
<ul class="ceebox mixed">
<?
$buttons = $db->Execute("select * from " . TABLE_CATEGORY_BUTTONS . " where cat_id = '" . zen_get_products_category_id((int)$_GET['products_id']). "' ");
$buttonName = $buttons->fields['name'];
$url = $buttons->fields['url'];
while (!$buttons->EOF) { ?>
<li><a href="/shop/popups/<?php echo $url ?>">
<img width="159" height="34" border="0" src="shop/images/category_buttons/<?php echo $buttonName ?>" /></a></li>
</ul>
<?php $buttons->MoveNext();
}
?>
Bookmarks