How to nest a recordset inside a repeat region php/mysql?
I have a products page with a recordset listing items by category.
i have a 2nd recordset on the same page with color choices for each item
sql for color recordset-
mysql_select_db($database_connstore, $connstore); $query_rs_colors = "SELECT * FROM color_lookup, colors, items WHERE color_lookup.item_colorID = items.item_colorID"; $rs_colors = mysql_query($query_rs_colors, $connstore) or die(mysql_error()); $row_rs_colors = mysql_fetch_assoc($rs_colors); $totalRows_rs_colors = mysql_num_rows($rs_colors);
table color_lookup has two columns, color_ID and item_colorID, joint primary keys
table colors has two colums, color_ID and colors, color_ID is primary and auto increment (nine different colors)
table items has numerous colums, one being item_colorID, which is an index
i have the items recordset with a repeat region.
i put a dreamweaver menu inside the repeat region and populated dynamically with the color recordset.
When viewed in a browser, the items list properly but the menu shows incorrectly.
I have been told that for the list to match the item, i have to nest the recordset code inside the repeat region. I am not sure where and what code to move?
thanks for any help,
jim balthrop
ps-this is a continuation from a previous thread, but i felt it has changed so much, that i needed to start over.
