Okay, thanks. I think I get what you're saying. I also realize that making a new db query for each pass through the loop wasn't the most sane way to accomplish this either.
However, i'm still having an issue getting the right query results.
I've taken a step backwards and am now trying to get just an array of prod ids. Sounds simple enough ...but it's not working for me. Here's what I have:
$prodIds_query = "SELECT p.products_id FROM " . TABLE_PRODUCTS . " p WHERE p.products_status = '1'";
$myProdIds = $db->Execute($prodIds_query);
echo "Array count: " . count($myProdIds) . "<br /><br />";
foreach ($myProdIds as $idsValues){
echo "Array values: " . $idsValues . "<br />";
}
The result of running the above is this seemingly (to me anyway :blush:) odd reply:
Array count: 1
Array values:
Array values: Resource id #303
Array values: 0
Array values:
Array values: Array
Its retrieving a recordset of 1 ....yet I can view the 13 products currently loaded into my localhost demo/test Zen Cart store. Furthermore, if I copy/paste this same query into MySQL Query Browser, it displays the correct 13 records. :wacko:
Any thoughts on what I'm doing wrong in trying to get at it from within Zen Cart itself???