在mysql查询后从php中的变量中删除行

Hi Friends , I need a small help to figure out how to delete the rows from table "Item" if "Item code" is there in table "Order_summery" for a particular subscriber.

table ## ITEM :

Item code   name    waight  cost    colour
8956        aaa      10     100     red 
2514        cccc     20     110     red 
7945        dddd     30     140     white
3156        eeee     40     90      black

table ### Order_summery:

oder    customer_iD     Item code   Bonus   cost
11265        45           7945       10     126

Code:

$sql= "SELECT * FROM ITEM";
$resultser=mysql_query($sql) or mysql_error(); 

$sql2= "SELECT * FROM Order_summery where customer_iD = 45 ";
$result=mysql_query($sql2) or mysql_error(); 

now how to delete the row number 4 of variable $sql as the same Item code is there in table "Order_summery"

If you want to delete records from table item and keep records in order_summary table , then try this

 DELETE FROM item WHERE item_code IN (SELECT item_code FROM Order_Summary);