日期:2014-05-17 浏览次数:20545 次
case 'add' : //新增
$sku=$_POST['sku_txt'];
$salesku=$_POST['salesku_txt'];
$fnsku=$_POST['fnsku_txt'];
$diqu=$_POST['diqu_txt'];
$asin=$_POST['asin'];
$accout=$_POST['account'];
$type=$_POST['type'];
$query = mysql_query("insert into `sku_rule` (`item_code`,`sku`,`asin`,`fnsku`,`delivery_areas`,`account`,`type`)values('$sku','$salesku','$asin','$fnsku','$diqu','$accout','$type')");
if (mysql_affected_rows($conn) != 1){
echo "<script> alert('添加失败!');location.href='sku_comparison.php';</script>";
} else {
echo "<script> alert('添加成功!');location.href='sku_comparison.php';</script>";
}
break;
case 'del' : //删除
$id=$_GET["delivery"];
$SQL = "delete from `sku_rule` where id in($id)";
$result = mysql_query($SQL);
if (mysql_affected_rows($conn) != 1){
echo "<script>alert('删除失败!');location.href='sku_comparison.php';</script>";
} else {
echo "<script>alert('删除成功!');location.href='sku_comparison.php';</script>";
}
break;