 |
เเปลก ว่า ทำไมเเก้ไขข้อมูลไม่ได้ มันเเสดง error ว่า You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group='งบประมาณ',activities='จัดซื้อวัสด�' at line 1 |
|
 |
|
|
 |
 |
|
Code (PHP)
<?
include("connect.php");
$strSQL = mysql_query("UPDATE c_money SET group='".$_POST["group"]."',activities='".$_POST["activities"]."', b_headcount='".$_POST["b_headcount"]."',b_study_free='".$_POST["b_study_free"]."', b_resources_m='".$_POST["b_resources_m"]."',b_other='".$_POST["b_other"]."', dd='".$_POST["dd"]."',mm='".$_POST["mm"]."',yy='".$_POST["yy"]."', amount='".$_POST["amount"]."',remaining_stm='".$_POST["remaining_stm"]."',Statements_au='".$_POST["Statements_au"]."' WHERE id='".$_GET["id"]."' ") or die(mysql_error());
if($strSQL){
echo"<script>";
echo"alert('เเก้ไขข้อมูลเรียบร้อยเเล้ว');";
echo"location.href='c_money.php?id=".$_GET["id"]."';";
echo"</script>";
exit("");
}else{
echo "error";
}
mysql_close($objConnect);
?>
Tag : PHP, HTML/CSS, Ajax, CakePHP
|
|
 |
 |
 |
 |
Date :
2012-08-29 10:31:52 |
By :
เกียวซ่า |
View :
1649 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอา code ใส่แท็กจะได้อ่านง่าย ๆ คนจะได้เข้ามาช่วยครับ 
|
 |
 |
 |
 |
Date :
2012-08-29 10:44:04 |
By :
apisitp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|