0
Good, I want to update a table where in one of the variables I want to insert the value "CURRENT_TIMESTAMP".
In a normal situation just send the value as a string and sql would interpret it and translate it to the current date.
The point is you’re not doing it and I don’t understand why.
My code is as follows and I am using the Codeigniter framework.
public function resetlogin(){
$this->db->set('ulogin', 'CURRENT_TIMESTAMP');
$this->db->set('tentativa1', 0);
$this->db->set('tentativa2', 0);
$this->db->where('codigo',18990);
$this->db->update('usuario');
}
All other values are updated normally.
Someone can identify the problem?
you have already tried to leave the table structure to do that automatic insertion ? where you define in the
DB
that the columnulogin
and kindtimestamp
. Or yourself that insert ?– Mateus
what is inserted in the field
ulogin
when that code is executed?– RFL
0000-00-00 00:00
– Marco Silva
I haven’t tried automatic insertion yet, I’ll try tomorrow
– Marco Silva