Then you output your sql variable directly and copy it to the database. Where we see the SQL is < br / >
< div class = "aw - list - img >
I tried to update my data, but there were always syntax errors. I matched all the field names and checked the punctuation. Still don't know why? Can anyone tell me? Thanks!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<?php
require_once("../dataBase.php");
$sql="UPDATE dishList_table SET name='".$POST["dish_name"]."',SET content1_name='".$_POST["content1_name"]."',SET content2_name='".$_POST["content2_name"]."',SET content3_name='".$_POST["content3_name"]."',SET content4_name='".$_POST["content4_name"]."',SET content5_name='".$_POST["content5_name"]."',SET content6_name='".$_POST["content6_name"]."',SET content7_name='".$_POST["content7_name"]."',SET content8_name='".$_POST["content8_name"]."',SET content9_name='".$_POST["content9_name"]."',SET
content10_name='".$_POST['content10_name']."',SET content11_name='".$_POST["content11_name"]."',SET
content12_name='".$_POST["content12_name"]."'.SET content13_name='".$_POST["content13_name"]."',SET
content14_name='".$_POST["content14_name"]."',SET content0_name='".$_POST["content0_name"].",SET
dish_kind='".$_POST["dish_kind"]."',SET
vegetarian='".$_POST["vegetarian"]."',SET
dish_cook='".$_POST["dish_cook"]."',SET
balanced_constitution='".$_POST["balanced_constitution"]."',SET yang_deficiency_constitution='".$_POST["yang_deficiency_constitution"]."',SET ying_deficiency_constitution='".$_POST["ying_deficiency_constitution"]."',SET phlegm_dampness_constitution='".$_POST["phlegm_dampness_constitution"]."',SET
dampness_heat_constitution='".$_POST["dampness_heat_constitution"]."',SET
qi_deficiency_constitution='".$_POST["qi_deficiency_constitution"]."',SET
qi_stagnation_constitution='".$_POST["qi_stagnation_constitution"]."',SET
inherited_special_constitution='".$_POST["inherited_special_constitution"]."',SET
blood_stasis_constitution='".$_POST["blood_stasis_constitution"]."',SET
total_quantity_of_heat='".$_POST["total_quantity_of_heat"]."',SET
total_quantity_of_weight='".$_POST["total_quantity_of_weight"]."'
WHERE dish_name='".$_POST["dish_name"]."';";
$conn->query($sql);
if($conn->query($sql)==TRUE){
echo "插入成功";
}else{
echo "ERROR:".$sql."
".$conn->error;
}
?>
<body>
</body>
</html>
0 Answer
Then you output your sql variable directly and copy it to the database. Where we see the SQL is < br / >
< div class = "aw - list - img >
这家伙很懒,什么都没留下...