Re: Adding an DATETIME as a string to a mySQL databse... .

From: Date: Wed, 12 Jul 2000 10:30:21 +0000
Subject: Re: Adding an DATETIME as a string to a mySQL databse... .
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1067@lists.php.net to get a copy of this message
Well it was NOW() that solved the problem. Thanks anyway. - mattias -- mattias.hedman@popwire.com web programmer > From: Boaz Yahav <berber@netvision.net.il> > Subject: RE: [PHP-DB] Adding an DATETIME as a string to a mySQL databse... . > > 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@popwire.com] > 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@popwire.com > web programmer

« previous php.db (#1067) next »