CodeIgniter / PHP Active Record no incrementará un número entero
Aquí está mi consulta, en el Registro Activo de CodeIgniter:
function calculate_invites($userid)
{
$this->db->where('id', $userid)
->update('users', array('invites' => 'invites-1', 'sentinvites' => 'sentinvites+1'), FALSE);
}
Los camposinvites
ysentinvites
ambos son enteros pero se establecen en 0 después de ejecutar la función. Esto me hace suponer que CodeIgniter está pasandoinvites-1
ysentinvites+1
como cadenas, pero pensé agregarFALSE
hasta el final lo detuvo haciendo eso?
¡Gracias!
Jack