php-general | 2000071
Date: 07/12/00
- Next message: Bernhard Fuerst: "[PHP] How to get name of a variable?"
- Previous message: Benton Jackson: "[PHP] "get" variables, before or after header sent?"
- Maybe in reply to: Boaz Yahav: "[PHP] RE: [PHP-DB] Adding an DATETIME as a string to a mySQL databse... ."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
It looks to me like your DATE() function call should
be working. Here's a good way to test functions, and
this will show whether your DATE call is right...
Run the interactive SQL shell (I don't know what it's
called in mySQL, but it's some program you run from
unix shell that let's you issue commands directly to
the database server.)
Test your SQL function like this:
prompt> select DATE("Y-m-d H:i:s");
That will immediately print your result, and you
should see right away if your DATE() call is returning
00:00 etc.
Michael
--- Boaz Yahav <berber <email protected>> wrote:
> did you put ' ' around the value?
>
> if you want to enter the current time you can simply
> do now()
>
>
> Sincerely
>
> berber
>
> Visit http://www.weberdev.com Today!!!
> To see where PHP might take you tomorrow.
>
>
> -----Original Message-----
> From: Mattias Hedman [mailto:mattias <email protected>]
> Sent: Wednesday, July 12, 2000 12:05 PM
> To: php-general <email protected>
> Cc: php-db <email protected>
> Subject: [PHP-DB] Adding an DATETIME as a string to
> a mySQL databse....
>
>
> Hello all,
> I am having troubles adding an value to an mySQL
> database, the row is set as
> DATETIME which should accept strings.
>
> When I build the string using DATE("Y-m-d H:i:s") in
> PHP and inserts it into
> the database the only thing that gets added in the
> row is DATETIME default
> value (0000-00-00 00:00:00).
>
> Why?
> Please help.
>
> TIA, Greetings,
> Mattias Hedman
> --
> mattias.hedman <email protected>
> web programmer
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-db-unsubscribe <email protected>
> For additional commands, e-mail:
> php-db-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe <email protected>
> For additional commands, e-mail:
> php-general-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bernhard Fuerst: "[PHP] How to get name of a variable?"
- Previous message: Benton Jackson: "[PHP] "get" variables, before or after header sent?"
- Maybe in reply to: Boaz Yahav: "[PHP] RE: [PHP-DB] Adding an DATETIME as a string to a mySQL databse... ."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

