Hi,
I am developing a HTML5 based application. I need to process two queries concurrently, one inside another. Pseudo code attached below:
Can someone help me with the correct syntax for achieving this.
Regards,
Krishna Neeraja.
I am developing a HTML5 based application. I need to process two queries concurrently, one inside another. Pseudo code attached below:
Code:
function main() {
db.transaction( function (transaction) { transaction.executeSql(getDeptQuery, [bind1,bind2],processDepartments, errorHandler); } ); } function processDepartments(transaction, results) { for (var j=0; j
{ temp+= ""+results.rows.item(j).dept+"";
transaction.executeSql(getEmpQuery,[bindDept],processEmployees, errorHandler);
} document.getElementById('mydata').innerHTML +=temp; } function processEmployees(transaction, results1) { for (var j=0; j
{
temp+= ""+results1.rows.item(j).empname+"";
} document.getElementById('mydata').innerHTML +=temp;
}
Regards,
Krishna Neeraja.
Comment