I'm try to add the weight varibales that corespond to each individual ship number.
the code below results in:
ship, weight
5, 0.55
4, 0.80
3, 0.25
2, 0.50
1, 0.40
1, 0.50
1, 0.25
but what i Want is to add up the weights of ship 1 separately from ship 2
for examplep
5, 0.55
4, 0.80
3, 0.25
2, 0.50
1, 0..15
<PHP>
$result = mysql_query("SELECT DISTINCT shipment FROM shipment_count where orderid ='$dborderid'",$db);
while ($row = mysql_fetch_array($result)){
$shipment=$row['shipment'];
$result2 = mysql_query("SELECT weight FROM shipment_count where orderid ='$dborderid' AND shipment='$shipt'",$db);
while ($row2 = mysql_fetch_array($result2)){
$shipweight =$row2['weight'];
echo"$ship, $shipweight";
}
}
</PHP>
Thanx, Airric