1
不知何故,我的应用程序在Win-Safari中完美工作,但不知何时由PhoneGap包装。这是片段:PhoneGap嵌套executeSql不工作在iPad模拟器
// working db connection
db.transaction(function(tx) {
tx.executeSql('SELECT * FROM tbl', [], function(tx, rs){
// do something with the result
tx.executeSql('SELECT * FROM another_tbl', [], function(txTwo, rsTwo){
// do something with the result
// further nesting ...
}, errorHandler, successHandler);
}, errorHandler, successHandler);
}
第一个结果集是正确的,我可以console.log()数据。但在此之后,我无法访问第二个嵌套查询的数据。
我没有收到任何错误,而且我的处理程序也没有被调用(例如errorHandler)。有趣的是,它不会导致Safari上的任何问题(赢7)