我为 SQLite 表中的更新记录编写此函数,它不起作用,我不明白为什么,谢谢
function UpdateValues() {
var id=document.getElementById("id").value;
var mydata=document.getElementById("CommonName").value;
var mydata2=document.getElementById("location").value;
var mydata3=document.getElementById("datte").value;
var mydata4=document.getElementById("Observations").value;
var db = openDatabase('birdsdata1','1.0', 'Test DB', 2 * 1024 * 1024);
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS birdstabla1 (RegNum INTEGER
PRIMARY KEY, CommonName CHAR(17), location CHAR(32), datte CHAR(10),
Observations CHAR(90))');
tx.executeSql('UPDATE birdstabla1 SET (location, Observations) VALUES (?, ?)
WHERE RegNum=?', [mydata, mydata2, id], functerr);
});
}