[eluser]junaids[/eluser]
hi.
i m saving some data to the database along with the current date. the date field in the DB is datetime. in my model i m writing a query like:
Code:
$time = time();
$query = "INSERT INTO news(News_headline, News_date)
VALUES ('$newsheadline', '$time')";
$this->db->query($query);
but in the DB the date is always inserted like: 0000-00-00 00:00:00
what m i doing wrong?