28
rated 0 times
[
30]
[
2]
/ answers: 1 / hits: 17496
/ 13 Years ago, sun, january 8, 2012, 12:00:00
From a tutorial code like this
function queryDB(tx) {
tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
}
function querySuccess(tx, results) {
}
function errorCB(err) {
alert(Error processing SQL: +err.code);
}
var db = window.openDatabase(Database, 1.0, PhoneGap Demo, 200000);
db.transaction(queryDB, errorCB);
in db.transaction i want to pass a variable as argument to queryDB function, so the code which i think of should looks like
db.transaction(queryDB(id), errorCB);
How I can actually implement this ? Or its simply gonna work like this and my id will be passed and get in tx ?
More From » javascript