title: Codeigniter, increase database value by value contained in variable
body: <p>I am using codeigniter, and I have the following function in my model to give points to the user.
  It is however not working, rather setting the points column to 0.</p>
  
  <p>This is how it is written in the codeigniter manual. Therefore I have no clue why it is not working...    </p>
  
  <p>Thanks</p>
  
  <pre><code>function give_points($username,$points)
  {
      $this-&gt;db-&gt;set('points', 'points + $points');
      $this-&gt;db-&gt;where('username', $username);
      $this-&gt;db-&gt;update('users'); 
      echo"done";
  }
  </code></pre>