title: Get database table row count javascript
body: <p>I need to display via a html page the number of rows within my sql database table. with javascript. I cant use php as the frontend of the template is all html. </p>
  
  <p>The admin section of my site uses php and uses the following code to get the number or rows within my channel table.</p>
  
  <pre><code>&lt;?php $qry="select * from channel";
                      $res=mysqli_query($con,$qry) or die(mysqli_error($con));
                      $rowcount=mysqli_num_rows($res);
  
                          ?&gt;&lt;?php echo $rowcount; ?&gt;
  </code></pre>
  
  <p>How can I reproduce the same using html and javascript.</p>
  
  <p>Thanks</p>