Hi all,
I hope someone can help me with this problem. I have a query that selects shipping details from a customer account. The i have a second query to count the weight of all the products in the shipping query. How do i count all the weights of products and display the result??
Shipping query:
$query = "SELECT * FROM Shipping, Customers, Orders, Delivery_Zones
WHERE Delivery_Zones.zone_id = Orders.delivery_zone AND Shipping.order_id = Orders.order_id AND Customers.customer_id = Orders.customer_id AND dispatch_date = '$dispatchdate'";
As you can see there can be more than one set of results for this query
Product weight query:
$order_id = $rows['order_id'];
$query2 = "SELECT * FROM Product_Description, Order_Details
WHERE Product_Description.product_id = Order_Details.product_id AND Order_Details.order_id = '$order_id'";
The finally my script to count the weight of products
$weight = $rows2['product_weight'];
$totalweight =+ $weight;
echo $totalweight;
I really appreciate any help, advice given in advance.
Regards,
Steven