[eluser]ibnclaudius[/eluser]
I'm trying to save the current timestamp in database but I alway got registered 0000-00-00 00:00:00
Code:
$data = array('username' => $this->input->post('username'),
'name' => $this->input->post('name'),
'email' => $this->input->post('email'),
'password' => $this->input->post('password'),
'timestamp' => time()
);
$this->Usermodel->create('users', $data);
Code:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`timestamp` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
Code:
function create($table, $data) {
$this->db->insert($table, $data);
}