|
 |
|
Help me คำสั่ง UPDATE ไม่ยอมทำงาน มีใครช่วยได้บ้างครับ |
|
 |
|
|
 |
 |
|
สวัสดี ครับ มีใคร จะช่วย ตอบได้บ้าง ครับ ผม มีโค๊ด
$sql_up= " update product " ;
$sql_up= $sql_up."set cat_id= '$type', pro_name= '$proname', pro_price= '$proprice',pro_immage='$efile', pro_detail='$prodetail', pro_size= '$prosize', pro_weight= '$proweight', pro_color=
'$procolor' ,amountstock= '$pronum' " ;
$sql_up = $sql_up." WHERE pro_id='$idup' ";
แต่ ดัน ไม่ทำงาน เอาไป ลอง รัน บน Mysql มันบอกว่าอันนี้ผิด $sql_up= " update product " ;
แต่ผมทำกับ ไฟล์ อื่น มันได้นะครับ เช่น
include "../config.php";
$sql="update category set cat_name='$catename' where cat_id='$id3'";
$result= mysql_query($sql);
if ($result)
echo"<br><b>แก้ไขข้อมูลประเภทสินค้าได้แล้ว</b>";
else
echo"<br><b>แก้ไขข้อมูลประเภทสินค้าไม่ได้</b>";
echo "<meta http-equiv='refresh' content='1; url=show_cate.php'>";}
?>
ก็ ทำงานได้ปกติ ดี
Tag : PHP, MySQL, CakePHP

|
|
 |
 |
 |
 |
Date :
2011-06-23 22:57:02 |
By :
tharit |
View :
754 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองแก้เป็น
Code (PHP)
$sql_up=" update product ";
$sql_up.="set cat_id= '$type', pro_name= '$proname', pro_price= '$proprice',pro_immage='$efile', pro_detail='$prodetail', pro_size= '$prosize', pro_weight= '$proweight', pro_color= '$procolor' ,amountstock= '$pronum' ";
$sql_up.=" WHERE pro_id='$idup' ";
|
 |
 |
 |
 |
Date :
2011-06-23 23:08:08 |
By :
ทองมี |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|