|
|
|
ผิดตรงไหนช่วยดูให้ด้วยครับ #ขอบคุณครับ #มือใหม่ |
|
|
|
|
|
|
|
Code (PHP)
<?php
if(isset($chk)){
$brand_sub_id = $func->getTable_name(durable_order,brand_sub_id,order_id,$code);
$brand_id = $func->getTable_name(durable_brand_sub,brand_id,brand_sub_id,$brand_sub_id);
$stock_type_id = $func->getTable_name(durable_brand,stock_type_id,brand_id,$brand_id);
$sql1 = "UPDATE durable_out_order SET stock_type_id='$stock_type_id',
brand_id='$brand_id',
brand_sub_id='$brand_sub_id',
out_order_number='$_POST[out_order_number]'
WHERE out_order_id = '$code' ";
if($result1 = mysql_db_query($db,$sql1) or die(mysql_error()) ){
$out_order_id = $func->getTable_last(durable_out_order,out_order_id);
$sql2 = "UPDATE durable_out_order_dt SET dep_id='$_POST[dep_id]',
out_order_code='$_POST[out_order_code]',
product_name='$_POST[product_name]',
product_ip='$_POST[product_ip]',
product_code='$_POST[product_code]',
out_order_by='$_POST[out_order_by]',
out_order_date='$_POST[out_order_date]',
out_order_dt='$_POST[out_order_dt]'
WHERE out_order_id = '$code' ";
if($result2 = mysql_db_query($db,$sql2) or die($sql2)){
$func->update_del_stock(durable_order,order_stock,$_POST[out_order_number],order_id,$_POST[order_id]);
echo "<script>alert('บันทึกข้อมูลเรียบร้อยแล้ว')</script>";
echo "<meta http-equiv='refresh' content='0; url=?page=".sha1(admin)."&admin=".sha1(outorder)."'>";
}else{
echo "<script>alert('พบข้อผิดพลาด 002')</script>";
echo "<meta http-equiv='refresh' content='0; url=?page=".sha1(admin)."&admin=".sha1(outorder)."'>";
}//end 002
}else{
echo "<script>alert('พบข้อผิดพลาด 001 ')</script>";
echo "<meta http-equiv='refresh' content='0; url=?page=".sha1(admin)."&admin=".sha1(editoutorder)."'>";
}//end 001
//echo $brand_id." - ".$brand_sub_id." - ".$stock_type_id;
}
?>
Tag : PHP, MySQL
|
ประวัติการแก้ไข 2016-02-08 22:06:16
|
|
|
|
|
Date :
2016-02-08 22:05:34 |
By :
indexcom |
View :
668 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เขร้ ตาลาย
|
|
|
|
|
Date :
2016-02-09 09:43:34 |
By :
compiak |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ผิดตรงไหน คืออะไร??
|
|
|
|
|
Date :
2016-02-09 10:03:00 |
By :
CasanovaKung |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|