title: How to automatically increment a value in database? (LIVE)
body: <p>I'd love to create great things with number based stuff.</p>
  
  <p>I totally have no idea how / where should I start.</p>
  
  <p>Let's say users have to register then log in to the site to use this feature (already done this).</p>
  
  <p>I tried to save their registration date in timestamp and calculate their value (the one that i need to increment) from the elapsed timestamp since registration. It was working, but when I set a maximum to this value, and then raised it's maximum, it just jumped to the new maximum (since the time was still going). Btw, this thing needs to be working even if the user is completely logged out, and also not on the site. (so it's server sided)</p>
  
  <p>So let's say I need to increment this value by 550 an hour, but after the first hour elapsed the incrementation grows to 650, after the second hour grows to 750 and so on... and as soon as it reached <strong><em>3272</em></strong> it must stay there.</p>
  
  <p>It's also important to visually upgrade this value LIVE. So the user doesn't have to refresh the page every time he/she wishes to take a look at their new value. I guess the hard part is that to calculate every second's incrementation value to match the value of the hour. Okay not that hard I guess it must be like 650/60/60 = 1 second</p>
  
  <p>Best Regards,
  Henrik</p>