title: how to display database with javascript in the form of a table?
body: <p>I have problems with my application that is when it will display the data from the database in the form of a data table that happen to two sideways instead of down 
  <img src="https://i.stack.imgur.com/CEgJS.png" alt=""></p>
  
  <p>main.js</p>
  
  <pre><code>$(document).ready(function(){
  var sql = ign.sql();
  var driver = sql.driver("sqlite","peserta.sqlite");
  var qry = sql.query("select * from data");
  
  if(driver){
      //$(".json").html(JSON.stringify(qry));
      var query = qry;
      var html = "";
  
      $("p").html("Status Database Connection : "+query.status);
      if(query.status){
  
           $.each(query.content,function(data){
              html += "&lt;td&gt;"+this.no+"&lt;/td&gt;";
              html += "&lt;td&gt;"+this.nama+"&lt;/td&gt;";
              html += "&lt;td&gt;"+this.alamat+"&lt;/td&gt;";
          });
      }
  
      $(".data").html(html);
  }
  </code></pre>
  
  <p>});</p>
  
  <p>this HTML</p>
  
  <pre><code>&lt;!doctype html&gt;
  </code></pre>
  
  <p>
  </p>
  
  
  
  
  
  
  
  <p></p>
  
  <p>
  </p>
  
  <pre><code>&lt;p&gt;&lt;/p&gt;
  &lt;!--
  &lt;h2&gt;JSON Data&lt;/h2&gt;
  &lt;div class="json"&gt;&lt;/div&gt;&lt;hr&gt; --&gt;
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;No&lt;/td&gt;
  &lt;td&gt;Nama&lt;/td&gt;
  &lt;td&gt;Alamat&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="data"&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>
  </p>