grats
2012-05-02 08:11:16
MySQL to be exact but doesn't seem to matter in this case
SELECT i.id, i.name, c.datetime, c.s_ID, c.qty, i.price, i.price * c.qty as 'TAmount' FROM cart c INNER JOIN items i ON i.id = c.id WHERE s_ID='$p_id';
Is there a way to sum all the TAmounts in the statement?
similar to how I multiplied price and quantity (qty) together and made them into 'TAmount' I was thinking maybe I could take all the TAmount's and just add them all together
thanks
SELECT i.id, i.name, c.datetime, c.s_ID, c.qty, i.price, i.price * c.qty as 'TAmount' FROM cart c INNER JOIN items i ON i.id = c.id WHERE s_ID='$p_id';
Is there a way to sum all the TAmounts in the statement?
similar to how I multiplied price and quantity (qty) together and made them into 'TAmount' I was thinking maybe I could take all the TAmount's and just add them all together
thanks
