I am trying to clone the feature products feature and have it populate with 10 items from a particular category for the home page.

I modified the query and the display code to do this. The query pulls the correct number of items but the display only outputs some of the result set. For example if I set the query to pull 12 items the display code only outputs items 2,3 and 4...if I pull 24 items I get 15 items. I will admit I'm new to zen cart but I can honestly so no reason this would not output the entire set. Thank you in advance for any help you can provide.

Here is the query:

Code:
  $specials_index_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
									WHERE p.master_categories_id = '49' LIMIT 12";


if ($specials_index_query != '') $specials_index = $db->Execute($specials_index_query);

Here is the output code:

Code:

<?php
$foo = 1;
  while (!$specials_index->EOF) {
  	echo $foo." ";

    $products_price = zen_get_products_display_price($specials_index->fields['products_id']);
  // pull products descriptio
  // buy now button
    $featured_buy = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton featuredModuleButton"') . '</a>';
  if (!isset($productsInCategory[$specials_index->fields['products_id']])) $productsInCategory[$specials_index->fields['products_id']] = zen_get_generated_category_path_rev($specials_index->fields['master_categories_id']);

    $list_box_contents_vibe[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . ' ',
    'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<div class="featuredMain">' . '<div class="featuredName"><a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a></div>' . '<div class="featuredImage"><a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], '150', '150') . '</a></div>') . '<div class="featuredPrice">' . $products_price . '</div>' . '<div class="featuredButton">' . $featured_buy . '</div>' . '</div>');

    $col ++;
    if ($col > (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS - 1)) {
      $col = 0;
      $row ++;
    }
      	$foo++;
		$specials_index->MoveNext();
  }

    
       
?>

<ul>
<?php
if (is_array($list_box_contents_vibe) > 0 ) {
 for($row=0;$row<sizeof($list_box_contents_vibe);$row++) {
    $params = "";
    if (isset($list_box_contents_vibe[$row]['params'])) $params .= ' ' . $list_box_contents_vibe[$row]['params'];
?>

<?php
    for($col=0;$col<sizeof($list_box_contents_vibe[$row]);$col++) {
      $r_params = "";
      if (isset($list_box_contents_vibe[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents_vibe[$row][$col]['params'];
     if (isset($list_box_contents_vibe[$row][$col]['text'])) {
?>
    <?php echo '<li>' . $list_box_contents_vibe[$row][$col]['text'] .  '</li>' . "\n"; ?>

<?php
      }
    }
?>

<?php
  }
}
?> 
</ul>