Re: problem with writing date/time into db
| From: | JJeffman | Date: | Sun, 25 Mar 2001 14:48:46 +0000 |
| Subject: | Re: problem with writing date/time into db | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7773@lists.php.net to get a copy of this message | ||
You've misplaced a "$date" variable instead of $datum, $date has no value .
HTH
Jayme.
-----Mensagem Original-----
De: Florian Poppele <eleppop@gmx.de>
Para: <php-db@lists.php.net>
Enviada em: domingo, 25 de março de 2001 10:26
Assunto: [PHP-DB] problem with writing date/time into db
> 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.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>