repeating regions for user history
I am trying to make a repeating region within another repeating table I have for user shopping history.
First I have a repeating region referencing order details from a key column regarding a user's order ID.
The second part I am trying to set up is a repeating table of items placed under the user's unique order ID.
Here is what I have
<table id="WADAResultsTable" border="0" cellpadding="0" cellspacing="0">
<?php do { ?>
<tr>
<td width="594" >
<div class="WADAResultTitle">
<table width="642" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="111"><span class="red">Date ordered:</span></td>
<td width="248"><?php echo $row_WADAorderdetails['DetailDate']; ?></td>
<td width="47" class="red">Status:</td>
<td width="236"><?php echo $row_WADAorderdetails['DetailOrderStatus']; ?></td>
</tr>
<tr>
<td><span class="red">Tracking Number:</span></td>
<td><?php echo $row_WADAorderdetails["DetailTrackNumber"]; ?></td>
<td> </td>
<td> </td>
</tr>
</table>
<table width="570" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="193" align="left" valign="top" bgcolor="#CECECE"> </td>
<td width="208" colspan="-1" align="left" valign="top" bgcolor="#CECECE">Item:</td>
<td width="180" colspan="-1" align="left" valign="top" bgcolor="#CECECE">Quantity:</td>
<td width="180" colspan="-1" align="left" valign="top" bgcolor="#CECECE">Price:</td>
</tr>
<tr>
<td colspan="4" align="left" valign="top"><?php do { ?>
<table width="200" border="0">
<tr>
<td> </td>
<td><?php echo $row_WADAorderdetails["DetailItemName"]; ?></td>
<td><?php echo $row_WADAorderdetails['DetailQuantity']; ?></td>
<td><span class="WADAResultPrice"><?php echo $row_WADAorderdetails["DetailPrice"]; ?></span></td>
</tr>
</table>
<?php } while ($row_WADAorderdetails = mysql_fetch_assoc($WADAorderdetails)); ?></td>
</tr>
<tr>
<td colspan="4" align="left" valign="top">(Total for order ID <?php echo $row_WADAorderdetails['DetailOrderID']; ?> is $<?php echo $row_WADAorderdetails['DetailOrderTotal']; ?>)</td>
</tr>
</table>
<p> </p>
</div></td>
</tr>
<?php } while ($row_WADAorderdetails = mysql_fetch_assoc($WADAorderdetails)); ?>
</table>
I am having trouble filtering the items ordered by the user to match the unique order ID. I would appreciate any suggestions.
Thanks
Phil