title: how do i select previous row's value and past in current row?
body: <p>Im using mysql and This is the entry I have in my current table.</p>
  
  <p>So here <strong><em>previous balance</em></strong> for current month should be the <strong><em>remaining balance</em></strong> of previous month. How do I get this value from previous row of database.</p>
  
  <pre><code>Previous_balance Remaining_Balance
          0.00        42.64
          0.00        627.69
          0.00        45.54
          0.00        67.60
  </code></pre>
  
  <p>The result should be </p>
  
  <pre><code>Previous_balance Remaining_Balance
          0.00        42.64
          42.64       627.69
          627.69      45.54
          45.54       67.60
  </code></pre>
  
  <p>I have ID as PK and I want store the new previous_balance in database and print on form. So I can calculate Monthly charges and usage and other stuff. Thanks for answers.</p>