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