 |
ช่วยดูหน่อยครับ แก้ไขข้อมูล ไม่ได้เลย (UPDATE PHP) |
|
 |
|
|
 |
 |
|
โค๊ดหน้า UPDATE ลงฐานข้อมูล
Code (PHP)
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
<?php
include "config.ini.php";
$sql=" update google_adword set name1='$_POST[name1]',idcard='$_POST[idcard]' ,address2='$_POST[address2]' ,address3='$_POST[address3]'
,site='$_POST[site]',decision='$_POST[decision]',Positions='$_POST[Positions]',officephone='$_POST[officephone]',mobilePhone='$_POST[mobilePhone]'
,mail2='$_POST[mail2]',maincontact='$_POST[maincontact]',Positions2='$_POST[Positions2]',officephone2='$_POST[officephone2]' ,mobilePhone2='$_POST[mobilePhone2]'
,mail3='$_POST[mail3]',contactpayment='$_POST[contactpayment]',Positions3='$_POST[Positions3]',officephone3='$_POST[officephone3]'
,mobilePhone3='$_POST[mobilePhone3]',mail4='$_POST[mail4]',category='$_POST[category]',promote='$_POST[promote]',port='$_POST[port]'
,problem='$_POST[problem]',knowledge='$_POST[knowledge]',expectations='$_POST[expectations]',understanding='$_POST[understanding]'
,feedback='$_POST[feedback]',style='$_POST[style]',convenience='$_POST[convenience]',other='$_POST[other]'
,am='$_POST[am]',package='$_POST[package]',servicecharge='$_POST[servicecharge]',click='$_POST[click]',budget='$_POST[budget]'
,services='$_POST[services]',free='$_POST[free]',reporting='$_POST[reporting]' where id=$_POST[id_edit] ";
$reuslt=mysql_query($sql) or die('Update Error');
mws_message('แก้ไขข้อมูลเรียบร้อย','view.php');
?>
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2015-02-20 12:38:21 |
By :
naytee001 |
View :
659 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
echo $sql;
$reuslt=mysql_query($sql) or die(mysql_error());
เอา SQL กับ Error มาดูครับ
|
 |
 |
 |
 |
Date :
2015-02-20 13:54:52 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอบความคิดเห็นที่ : 1 เขียนโดย : mr.win เมื่อวันที่ 2015-02-20 13:54:52
รายละเอียดของการตอบ ::
Code
update google_adword set name1='Data1',idcard='Data2' ,address2='Data4' ,address3='Data5' ,site='Data6',decision='Data7',Positions='Data8',officephone='Data9',mobilePhone='Data10' ,mail2='Data11',maincontact='Data12',Positions2='Data13',officephone2='Data14' ,mobilePhone2='Data15' ,mail3='Data16',contactpayment='Data17',Positions3='Data18',officephone3='Data19' ,mobilePhone3='Data20',mail4='Data21',category='�ѧ���������͡��¡��',promote='Data23',port='Data24' ,problem='Data25',knowledge='�ѧ���������͡��¡��',expectations='�ѧ���������͡��¡��',understanding='�ѧ���������͡��¡��' ,feedback='�ѧ���������͡��¡��',style='Data30',convenience='Data31',other='Data32' ,am='Data33',package='�ѧ���������͡��¡��',servicecharge='Data35',click='Data36',budget='Data37' ,services='�ѧ���������͡��¡��',free='Data39',reporting='Data40' where id= 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 '' at line 9
|
 |
 |
 |
 |
Date :
2015-02-20 14:16:23 |
By :
naytee001 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|