What would be the best way to add values from a database? I want to add 'price_to_cust' WHILE 'cust_out'=xxxx AND 'order_no'=xxxx. Would it be better to do this with php or is there an easy way to do it with mysql?
Use a group by with a sum. SELECT cust_out, order_no, SUM(price_to_cust) AS price_summed GROUP BY cust_out, order_no WHERE cust_out = XXX and order_no = YYY