title: phonegap db Query insert/select syntax
body: <p>I am using phonegap(cordova 2.1.0) for IOS/android app development. Every time i have to make a query to select or insert/update i am doing this:</p>
  
  <pre><code>//to insert username, password into db
  var db = window.openDatabase(dbName, "1.0", gAppConfig.dbMessage, 200000);                
  db.transaction(queryUpdateURL, errorQuery);
  
  function queryUpdateURL(tx) 
              {
                  var newURL = document.getElementById('changeServerURL').value ; 
                  alert('new url='+newURL);
  
                  tx.executeSql("update "+gAppConfig.configTable+" set value='"+newURL+"' where key='serverURL'; ", queryUpdateSuccess, errorQuery);
  
                  return;
              }
  </code></pre>
  
  <p>So, Is is necessary to open the db every time i execute a query or only once is enough. Then, if db opening is a success, 'queryUpdateURL' gets called and if the query given inside it is a success, 'queryUpdateSuccess' is called,else errorQuery function is called. SO, just make a single query, three functions are getting called. Is it the correct way/only way or any other workaround exists. This seems to be really painful, creating three functions for a single query. Any suggestions are most welcome. Thanks.</p>