Problem using NOW() in Database

here is my code insdie my own library


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


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

Try this one...
$userName = $this->ci->session->userdata('username');

$this->db->set('is_log', 0);
$this->db->where('user', $userName);

ok thanks man, it's work

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.