In this code, the external sqlite query will complete its work first, then it will switch to the internal sqlite query. Please explain to me why this is happening and also give a solution to my request.
db.transaction(function(transaction){ transaction.executeSql('SELECT * FROM OuterTable;', [], function(transaction,results){ if (results != null && results.rows != null) { for (var i = 0; i < results.rows.length; i++) { db.transaction(function(transaction){ transaction.executeSql('SELECT * FROM MyInnerTable;',[], function(transaction, result){ if (result != null && result.rows != null) { for (var j = 0; j < result.rows.length; j++) { } } },errorHandler); } ,errorHandler,nullHandler); } } },errorHandler); } ,errorHandler,nullHandler);
The problem is that here
First ---> Outer Sqlite Work Running, then Inner Sqlite running, but my Requirement is like for every value Outer Sqlite Inner Sqlite will work
for example: -
for(int i=0;i<=10;i++){ for(int j=0;j<=10;j++){ // here inner for loop will work for every value of outer for loop } }
Thanks in advance
source share