Ok, I can see why all of the statuses show the same, it is because this value is coming from a different recordset than the other info in the repeat region. The status is coming from rsStatus, the other information is coming from WADAorders. To fix this you will need to use the status binding from this WADAorders recordset instead. Currently the WADAorders recordset does not have this info, so you would need to update it with a join. It might look like this:
$query_WADAorders = "SELECT orders.OrderDate, orders.OrderID, orders.OrderShipName, orders.OrderAmount, orders.OrderStatus orderstatustypes.StatusLabel FROM orders
JOIN orderstatustypes ON orders.OrderStatus = orderstatustypes.StatusID
ORDER BY OrderDate DESC";
I'm not sure about the id name in your orderstatus table, you may need to update this. Make sure that you make a backup of your page before you attempt making any changes. There is another way you could do this, you could put the code for the rsStatus inside of the repeat region like this:
// repeat region start
<?php
$MMColParam_rsStatus = "-1";
if (isset($row_WADAorders['OrderStatus'])) {
$MMColParam_rsStatus = (get_magic_quotes_gpc()) ? $row_WADAorders['OrderStatus'] : addslashes($row_WADAorders['OrderStatus']);
}
mysql_select_db($database_connPMTecommerce, $connPMTecommerce);
$query_rsStatus = sprintf("SELECT * FROM orderstatustypes WHERE StatusID = %s", GetSQLValueString($MMColParam_rsStatus, "text"));
$rsStatus = mysql_query($query_rsStatus, $connPMTecommerce) or die(mysql_error());
$row_rsStatus = mysql_fetch_assoc($rsStatus);
$totalRows_rsStatus = mysql_num_rows($rsStatus);
?>
//begin displaying info