I am trying to understand the way functions are called in this tutorial
http://docs.phonegap.com/en/1.3.0/phonegap_storage_storage.md.html#SQLResultSetList
(* I tried googling about call back function but still don’t get these )
-
at the end there is
db.transaction(populateDB, errorCB, successCB);does that mean it will call function populateDB and if it fails it call errorCB and if it success it call successCB ? or what are the sequence of the function calls ? -
Then upper to that there is
tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);What does [ ] mean ? And again what is the sequence of function called as now querySuccess is before errorCB ( unlike the Q1. case ) ?
but check the api documentation for those functions (transaction and executeSql) to see what each argument is for, it should tell you the purpose of each argument