PHPでSQL文のバッチ(delete、update)実行
処理コード:
$query = ‘delete from ecs_goods_attr where attr_id=11 and goods_id=22;
Insert into ecs_goods_attr (goods_attr_id,goods_id,attr_id,attr_value,attr_price)values(Null,33,138,"hero",0);
update ecs_goods set goods_number=10,shop_price=55 where goods_id=33′;
$query_e = explode(';’,’$query’);
foreach ($query_e as $k =>$v)
{
mysql_query($query_e[$k]);
}