title: Find SUM of Table columns between specific Rows
body: <p>I have a table with several columns including a basic ascending number of 1-5 (Col A) &amp; another with specific numeric data (Col B). I'm trying to create a query string to find the accumulated value of Col B fields between desired row numbers.</p>
  
  <p>For example:</p>
  
  <pre><code>Column: A          Column: B
  
  1                    5
  2                    5
  3                    5
  4                    5
  5                    5
  </code></pre>
  
  <p>I'm trying to return the combined value of Column B between Rows 2 &amp; 4. which should result in 15.</p>
  
  <p>Current Coding effort:</p>
  
  <pre><code>$result=mysqli_query($con,"SELECT * FROM $table WHERE Column A BETWEEN &gt;=2 &amp; &lt;=4");
  
  {while ($row = $result-&gt;fetch_assoc() )
  $desirednumber=$row['Column B'];}
  </code></pre>
  
  <p>appreciate your help.</p>