Looks like I've only one more hurdle to at least get the page to print out correctly. So the array inside the category array is the problem.
I can get all the categories to display but only one product for each category so this is not running thru the array:
PHP Code:
$products_query = $db->Execute("SELECT p.products_id, pd.products_name, p.products_quantity, DATE_FORMAT(p.products_date_available, '%m-%d-%Y') AS products_date_available "
. "FROM products AS p, products_description AS pd WHERE p.products_id = pd.products_id AND p.products_id = " . $categories_products_query->fields['products_id']);
while(!$products_query->EOF) {
echo " <tr>\n"
. " <td valign=\"top\" align=\"left\" width=\"50%\" class=\"dataTableContent\">\n"
. $products_query->fields['products_name']
. " </td>\n"
. " <td valign=\"top\" align=\"right\" width=\"20%\" class=\"dataTableContent\">\n"
. zen_draw_input_field('product_qty_' . $products_query->fields['products_id'], $products_query->fields['products_quantity'], 'maxlength=10, size=7', false, $type = 'text', false)
. " </td>\n"
. " <td valign=\"top\" align=\"right\" width=\"30%\" class=\"dataTableContent\">\n"
. zen_draw_input_field('product_date_available_' . $products_query->fields['products_id'],
isset($products_query->fields['products_date_available']) ?
$products_query->fields['products_date_available'] : "now",
'maxlength=15, size=10', false, $type = 'text', false)
. " </td>\n"
. " </tr>\n";
// this marks the end of the movement thru the while statement.
$products_query->MoveNext();