title: Phonegap: What are the next steps after prepoulate the data base in phone gap app to retrieving data from sqlite in Phonegap,
body: <p>I have implemented a <strong>Phonegap</strong> application <strong>for iPhone</strong> using <strong><em>jQuery mobile</em></strong>. I have created a database using <strong>sqlite</strong>.</p>
  
  <p>I have created my own data base 0000000001.db with some list of tables.</p>
  
  <p>added it in to resources folder of xcode proj, </p>
  
  <p>and <strong>preloaded</strong> this data base in to the application in to the <em>WebKit</em> folder.</p>
  
  <p>when i cheack using sqlite manage it show all my data base tables and the content in the tables. But i want to show that content in the list views (table views)</p>
  
  <p>I preloded the data base by following the <a href="http://gauravstomar.blogspot.ca/2011/08/prepopulate-sqlite-in-phonegap.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3a%20GauravSTomarBootstrappingIntelligence%20%28Gaurav%20S%20Tomar%20%3a%20Bootstrapping%20Intelligence" rel="nofollow">Gaurav S Tomar™ Tutorial Link</a>.</p>
  
  <p>I dont know <strong><code>what are the next steps for data driven from the sqlite data base</code></strong></p>
  
  <p>Now I <strong>want to retrieve the data from the database tables and populate it in to list views</strong> (table views).</p>
  
  <p><em><code>i was very new to the phone gap applications</code></em>,</p>
  
  <p>I dont know <strong><code>were (in wich files) we implement the code to retrieve data from data base from my sqlite file 000001.db</code></strong> </p>
  
  <p>and <strong><code>how to display /populate that retrieved data base in list views</code></strong></p>
  
  <p>Any <strong><em><code>detailed</code></em></strong> suggestions / tutorials please? Thanks in advance..</p>
  
  <hr>
  
  <p>I have added a .js file main.js in that i have implementedm</p>
  
  <pre><code>function queryDB(sql) {
      dbmanager.connect_database();
      dbmanager.db.transaction(function(tx){
                               tx.executeSql(sql,[],getResult,dbmanager.errorCB);
                               },dbmanager.errorCB);
  }
  
  function getResult(tx,results)
  { 
  
       for(var i=0;i&lt;results.rows.length;i++){
      console.log(results.rows);
       console.log(results.rows.item[i]);
       }
  
  }
  
  $(document).ready(function()
                    {
  
                    $('#OneView').click(function() 
                                         {
                                         queryDB('select * from table');
                                         });
  
  
  
                    });
  </code></pre>
  
  <p>in that  <strong>console.log(results.rows);</strong>  prints like :  <code>{"length":3}</code></p>
  
  <p><strong>console.log(results.rows.item[i]);</strong> prints <code>TypeError: Result of expression 'message' [undefined] is not an object.</code></p>
  
  <p><strong><em>But not the column values i have added in the table</em></strong></p>