Dear All

I have 2 table, one is tableA (field are tableAid, orderno, orderqty, shipmentmonth) & another is tableB (field are tableBid, tableB_tableAid, buyh, buyr).

TableA have the order no#, qty, shipment month & other details, TableB has buyh, buyr & others details.

I want to have the total quantiy for each buyh of each shipmenthmonth (data type 2012-01, 2012-02...etc) group by buyh.

How can i do this with php? Plz help.