Is there a way to execute multiple statements in a single transaction? I want to do something like:
db.transaction(function (tx) { tx.executeSql( "CREATE TABLE Foo(ID INTEGER); CREATE TABLE Bar(ID INTEGER)", function (tx, result) { alert("success!"); }); });
But instead, I found that I should do something like this:
db.transaction(function (tx) { tx.executeSql("CREATE TABLE Foo(ID INTEGER)"); tx.executeSql("CREATE TABLE Bar(ID INTEGER)", function (tx, result) { alert("success!"); }); });
Am I limited to executing individual statements in their own transaction and then failing in a successful Fn transaction in the last transaction, or is there a way I can execute multiple statements in a single transaction?
digita1-anal0g
source share