tx.executeSql('SELECT * FROM bookmarks WHERE bookmarkID = ?', [newSync[i].id],
function(tx, results) {
console.log('results.rows.item(0).bookmarkID', results.rows.item(0).bookmarkID);
tx.executeSql('UPDATE bookmarksSync SET thumbnail=?, ts_created=?, visits=?,
visits_morning=?, visits_afternoon=?, visits_evening=?, visits_night=?, position=?,
idgroup=? WHERE bookmarkID=?',
[
results.rows.item(0).thumbnail,
results.rows.item(0).ts_created,
results.rows.item(0).visits,
results.rows.item(0).visits_morning,
results.rows.item(0).visits_afternoon,
results.rows.item(0).visits_evening,
results.rows.item(0).visits_night,
results.rows.item(0).position,
0,
newSync[i].id
], speeddial.storage.onError);
}, speeddial.storage.onError);
newSync [i] .id似乎未定义,我很确定我必须将它传递给回调函数,但我不知道如何......有什么想法吗? 我希望能够将newSync [i] .id和SQL选择的结果传递给另一个函数,这将更新WebSQL表