|
 |
|
(php mySQL) select add delete ได้ update ไม่ได้ ช่วยทีครับ |
|
 |
|
|
 |
 |
|
ลองเปลี่ยนส่วนนี้
//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
for($i=1;$i<=$_POST["hdnLine"];$i++)
{
$strSQL = "UPDATE category SET ";
$strSQL .="categoryID = '".$_POST["txtCatID$i"]."' ";
$strSQL .="WHERE categoryID = '".$_POST["hdnCatID$i"]."' ";
$objQuery = mysql_query($strSQL);
}
เป็น
//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
for($i=1;$i<=$_POST["hdnLine"];$i++)
{
$strSQL = "UPDATE category SET ";
$strSQL .="categoryID = '".$_POST["txtCatID$i"]."' ";
$strSQL .="WHERE categoryID = '".$_POST["hdnCatID$i"]."' ";
echo $strSQL; //แล้วก๊อปมาดู
$objQuery = mysql_query($strSQL);
}
|
 |
 |
 |
 |
Date :
2010-05-03 07:30:12 |
By :
siammbk |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$strSQL = "UPDATE category SET ";
$strSQL .="categoryID = '".$_POST["txtCatID$i"]."' ";
$strSQL .=",categoryName = '".$_POST["txtCatName$i"]."' ";
$strSQL .=",categoryDescription = '".$_POST["txtCatDesc$i"]."' ";
$strSQL .="WHERE categoryID = '".$_POST["hdnCatID$i"]."' ";
echo $strSQL;
$objQuery = mysql_query($strSQL);
ลองนำไปใส่ดูแล้วครับ แต่ยังไม่มีการแสดงผลใดๆเพิ่มเติมเลย - -
ขออภัยครับน topic แรก บอกอาการผิด มันไม่ได้แสดงผล error ครับ มันแสดงผล การ query ข้อมูลจาก DB มาโชว์ครับ
และหลังจากที่ผม แก้ไข ข้อมูล และกด submit เพื่อ update ลง DB ผลปรากฎออกมา เหมือนเป็น การ refresh page ครับ
คือไม่มีอะไรเปลี่ยนแปลงไปจากเดิม ครับ
|
 |
 |
 |
 |
Date :
2010-05-03 08:29:40 |
By :
kit |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|