查询:
$Sql ="
UPDATE
pick_up_address
SET
user_id = '" . $movers_id . "',
member_group_id = '" . $member_group_id . "',
nick_name = '" . $_POST[' nick_name '][$i] . "',
contact_person_name = '" . $_POST[' contact_person_name '][$i] . "',
contact_person_number = '" . $_POST[' contact_person_number '][$i] . "',
contact_address = '" . $_POST[' contact_address '][$i] . "'
WHERE
pick_up_address_id = '" . $pick_adddress_id[$i] . "',
lat = '" . $lat1 . "',
lng = '" . $lng1 . "'";
错误讯息:
您的SQL语法有错误;检查手册 对应于您的MySQL服务器版本,以便使用正确的语法 near lat =" value",lng =" value"
答案 0 :(得分:0)
当您尝试在代码段中时,无法用逗号连接WHERE子句。相反,你必须使用AND或OR等运算符。
所以而不是
... WHERE pick_up_address_id='".$pick_adddress_id[$i]."', lat='".$lat1."' ...`
尝试类似
的内容... WHERE pick_up_address_id='".$pick_adddress_id[$i]."' AND lat='".$lat1."' ...`
这些WHERE
子句的语法在mysql文档中精确定义,但实际上这只是标准的SQL语法: