[eluser]mashary[/eluser]
here is my code insdie my own library
Code:
$this->ci->db->where('user',$this->ci->session->userdata('username'));
$this->ci->db->update('users',array('is_log'=>'0','last_log',NOW()));
i got following error
Fatal error: Call to undefined function now() in C:\xampp\htdocs\fifi\system\application\libraries\authen.php on line 34
when i change my code into like this
adding bracket NOW() with quote
Code:
$this->ci->db->where('user',$this->ci->session->userdata('username'));
$this->ci->db->update('users',array('is_log'=>'0','last_log','NOW()'));
sql produce like this
Quote:UPDATE `users` SET `is_log` = '0', `last_log` = 'NOW()' WHERE `user` = 'mashary'
how can i put now() function?
sorry poor english