我正在尝试使用 javascript 中的 vars 构建一个 sql 语句字符串。
我得到了这一行代码
var sql = "'INSERT INTO UPLOADS (poleID, submitDate, poleDamaged, poleDown, wireDown, brokenFixture, brokenBulb, fullname, phonenumber, email, comments, address, city, state, zipcode, lat, lng) VALUES (" + poleID + "," + submitdate + "," + poleDamaged + "," + poleDown + "," + wireDown + "," + brokenFixture + "," + brokenBulb + "," + fullname + "," phonenumber + "," + email + "," + comments + "," + address + "," + city + "," state + "," + zipcode + "," + lat + "," + "," + lng + ")" + "'";
我的谷歌浏览器开发工具控制台抛出这个错误并指向上面的行
Uncaught SyntaxError: Unexpected identifier
抛出此错误的任何原因?所有变量都是有效的。