I have a page with a table that shows recieved/shipped/remaining progress of orders. the thing is, when the order hasn’t shipped anything yet(nothing in shipping.ponumber matching orders.ponumber, the table displays nothing. If it hasnt shipped anything I still want the order to appear,just with zero in the shipped field and however many to ship in the remaining field. I hope i explained myself well enough. Ive been trying alot of different things but just cant get it right. here is the code…
[php]<?php
$result = mysql_query(“SELECT orders.ID, two_ply, three_ply, ordered_by, ponumber, end_shipping, SUM(twoply) AS twoply, SUM(threeply) AS threeply
FROM orders JOIN shipping USING(ponumber)
GROUP BY ponumber”) or die( mysql_error());
$orderprogress="
Order ID | 2ply Ordered | 2ply Shipped | 2ply Remaining | 3ply Ordered | 3ply Shipped | 3ply Remaining | Ordered By | PO Number | Ship by Date |
---|---|---|---|---|---|---|---|---|---|
” . $row[‘ID’] . “ | ”;” . ‘’ . $row[‘two_ply’] . ‘’ . “ | ”;” . ‘’ . $row[‘twoply’] . ‘’ . “ | ”;” . ‘’ . ($row[‘two_ply’]-$row[‘twoply’]) . ‘’ . “ | ”;” . ‘’ . $row[‘three_ply’] . ‘’ . “ | ”;” . ‘’ . $row[‘threeply’] . ‘’ . “ | ”;” . ‘’ . ($row[‘three_ply’]-$row[‘threeply’]) . ‘’ . “ | ”;” . $row[‘ordered_by’] . “ | ”;” . $row[‘ponumber’] . “ | ”;” . $row[‘end_shipping’] . “ |
mysql_close();
?>[/php]