|
|
|
php mysql อัฟเดทแล้วข้อมูลไม่เปลี่ยนอ่ะครับรบกวนดูให้ทีครับ |
|
|
|
|
|
|
|
<? include_once "connDB.php"; ?>
<?
$query_Recordset1 = "SELECT * FROM repair_info INNER JOIN memuser ON repair_info.username=memuser.username";
if($submit=="OK"){
if($id1==""){
$sql="INSERT INTO repair_info set cust_id='".$cust_id."',store='".$store."', cust_name=".$cust_name."', address='".$address."',check1='".$check1."',check2='".$check2."', check3='".$check3."',check4='".$check4."',cust_alert='".$cust_alert."', date='".$date."',cust_status='".$cust_status."',edit_alert='".$edit_alert."',editor='".$editor."'";
}else{
$sql="UPDATE repair_info set store='".$store."' ,cust_name='".$cust_name. "' ,address='".$address."',check1='".$check1."',check2='".$check2."', check3='".$check3."',check4='".$check4."',cust_alert='".$cust_alert."', date='".$date."',cust_status='".$cust_status."',edit_alert='".$edit_alert."',editor='".$editor."' WHERE cust_id='".$id1."'" ;
}
mysql_query($sql);
}
if ($submit=="DEL"){
$sql="delete from repair_info where cust_id ='".$id1."'";
mysql_query($sql);
}
?>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2013-01-04 20:21:13 |
By :
luk101 |
View :
908 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
mysql_query($sql) or die(mysql_error());
เอา error มาดูหน่อยครับ
|
|
|
|
|
Date :
2013-01-05 07:28:21 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|