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.
This is how it is written in the codeigniter manual. Therefore I have no clue why it is not working...
Thanks
function give_points($username,$points)
{
$this->db->set('points', 'points + $points');
$this->db->where('username', $username);
$this->db->update('users');
echo"done";
}