How to Insert NOW() function into Database with CodeIgniter's using Active Record
$data = array(
'user_name' => $uname,
'user_pwd' => $pwd,
'user_email' => $email,
);
$this->db->set('regOn', 'NOW()', FALSE);
$this->db->insert('userLogin', $data);
Another way is we can pass as array element.
$data = array(
'user_name' => $uname,
'user_pwd' => $pwd,
'user_email' => $email,
'regOn' => NOW(), FALSE
);
Comments
Post a Comment