 |
|
สอบถามค่ะ คือมันขึ้นแบบนี้ไม่ทราบว่าจะแก้ไขได้ยังไงค่ะ
Error Save [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 'Using) VALUES ('','' ,'' ,'','' ,'')' at line 1]
Code (PHP)
//*** Add Condition ***//
if(isset($_POST['hdnCmd']) && $_POST['hdnCmd'] == "Add")
{
$strSQL = "INSERT INTO travel ";
$strSQL .="(Place_id,Name,Province,Distrinct,Suggestion,Using) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["txtAddPlace_id"]."','".$_POST["txtAddName"]."' ";
$strSQL .=",'".$_POST["txtAddProvince"]."' ";
$strSQL .=",'".$_POST["txtAddDistrict"]."','".$_POST["txtAddSuggestion"]."' ";
$strSQL .=",'".$_POST["txtAddUsing"]."') ";
$objQuery = mysql_query($strSQL);
if(!$objQuery)
{
echo "Error Save [".mysql_error()."]";
}
//header("location:$_SERVER[PHP_SELF]");
//exit();
}
Tag : PHP, MySQL, Linux
|
ประวัติการแก้ไข 2015-05-24 02:01:32
|
 |
 |
 |
 |
Date :
2015-05-24 02:00:14 |
By :
Natcha.oil |
View :
704 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |