Can someone help me with my do while?
I have a table that pulls data from mysql database. The first column of the table has a link that shows all records that with the same order number and displays the results…well that’s what it should do, but it only shows the first record.
This is code that I used to generate the table.
[php] <?php do { ?>
<td width="80"><div align="center"><?php echo $row_Orders['OrderDate']; ?></div></td>
<td width="110"><div align="center"><?php echo $row_Orders['RequiredDate']; ?></div></td>
<td width="100"><div align="center"><?php echo $row_Orders['fk_TrophyCode']; ?></div></td>
<td><div align="center"><?php echo $row_Orders['Customer']; ?></div></td>
<td><div align="center"><?php echo $row_Orders['PartCode']; ?></div></td>
<td><div align="center"><?php echo $row_Orders['PartDescription']; ?></div></td>
<td width="60"><div align="center"><?php echo $row_Orders['PartQty']; ?></div></td>
<td width="15"><div align="center"><?php echo $row_Orders['Freight']; ?></div></td>
<td width="15"><div align="center"><?php echo $row_Orders['Supplier']; ?></div></td>
</tr>
<?php } while ($row_Orders = mysql_fetch_assoc($Orders)); ?> [/php]
and this is my query
mysql_select_db($database_TrophyMaster, $TrophyMaster);
$query_Orders = sprintf(“SELECT * FROM tbl_OrderDetails WHERE OrderNumber = %s AND tbl_OrderDetails.ClientID = %s GROUP BY Customer, fk_TrophyCode”, GetSQLValueString($colname_Orders, “text”),GetSQLValueString($ID_Orders, “int”));
$Orders = mysql_query($query_Orders, $TrophyMaster) or die(mysql_error());
$row_Orders = mysql_fetch_assoc($Orders);
$totalRows_Orders = mysql_num_rows($Orders);
$count=mysql_num_rows($result);