我有几个查询正在运行,但更新查询不会更新数据,也不会抛出任何错误。
我显然错过了什么,但我看不出它是什么。
选择查询正在运行,插入查询正在处理其无效的更新查询。
这是有效的
db.transaction(function (tx) {
tx.executeSql("INSERT INTO customers (firstname1,lastname1,firstname2,lastname2,email1,email2,phone1,phone2,createDate,syncDate,userId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [data.firstname1,data.lastname1, data.firstname2, data.lastname2, data.email1, data.email2, data.phone1, data.phone2, data.createDate, data.syncDate,data.userId], onError);
});
这不起作用。
db.transaction(function (tx) {
tx.executeSql("UPDATE customers SET firstname1 = ?, firstname2 = ?, lastname1 = ?, lastname2 = ?, phone1 = ?, phone2 = ?, email1 = ?, email2 = ? WHERE id = ?", [firstname1, lastname1, firstname2, lastname2, email1, email2, phone1, phone2, i], updateCB, onError);
});
有关何处查看的任何建议?