0
我在將多個記錄插入HTML5數據庫時遇到問題。我驗證了正確插入的模式。HTML5本地數據庫插入
我以無效的方式調用它嗎?
// Ajax Call to Get Users function
$.ajax({
type: "POST",
url: "Handlers/UserHandler.php",
data: "method=getAllUsers",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (data) {
database.db.transaction(function (tx) {
for (var id in data) {
tx.executeSql('INSERT INTO contacts(id, fname, lname, email, loginId) VALUES (?, ?, ?, ?, ?)', [id , data[id].FirstName, data[id].LastName, data[id].Email, data[id].LoginId]);
}
});
}
});