problem with writing date/time into db
| From: | Florian Poppele | Date: | Sun, 25 Mar 2001 13:26:35 +0000 |
| Subject: | problem with writing date/time into db | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7771@lists.php.net to get a copy of this message | ||
Just started with PHP. I'm trying to write a news post script. Somehow den
actual date isn't written properly into the db. There's always '0000-00-00
00:00:00' saved into the db.
my code:
$datum = date("Y-m-d H:m:s");
$sql = "INSERT INTO news (datum,tag,text,autor) VALUES
('$date','$tag','$text', '$autor')";
If anyone can help, i'd be happy. Thanks.