总是出错
我尝试将变量放在引号中,将假名放在引号中,但仍然出错
"UPDATE employee_info
SET NAME=$Name, ADDRESS=$Address, EMAIL=$Email, CELL_NO=$Cell_no, CNIC=$Cnic, DESIGNATION=$Designation, BASIC_PAY=$Basic_pay, BONOUS=$Bonous, TOTAL_PAY=$Basic_pay+$Bonous
WHERE ID=$ID"))
更新的行
答案 0 :(得分:-1)
换行包含引号之类的文本-
"UPDATE employee_info SET NAME='$Name', ADDRESS='$Address', EMAIL='$Email', CELL_NO=$Cell_no, CNIC=$Cnic, DESIGNATION=$Designation, BASIC_PAY=$Basic_pay, BONOUS=$Bonous, TOTAL_PAY=$Basic_pay+$Bonous WHERE ID=$ID"
如果还有更多包含文本的字段,则也将它们包裹起来。