CodeIgniter/PHP Active Record won't increment an integer

musskigginc

New Member
Here's my query, in CodeIgniter's Active Record:\[code\]function calculate_invites($userid){ $this->db->where('id', $userid) ->update('users', array('invites' => 'invites-1', 'sentinvites' => 'sentinvites+1'), FALSE);}\[/code\]The fields \[code\]invites\[/code\] and \[code\]sentinvites\[/code\] are both integers but are set to 0 after the function is run. This makes me presume that CodeIgniter is passing \[code\]invites-1\[/code\] and \[code\]sentinvites+1\[/code\] as strings, but I thought appending \[code\]FALSE\[/code\] to the end stopped it doing that?Thanks!Jack
 
Back
Top