RE: [PHP] on the list yesterday regarding mysql time

From: Date: Wed, 07 Mar 2001 23:24:02 +0000
Subject: RE: [PHP] on the list yesterday regarding mysql time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42967@lists.php.net to get a copy of this message
Thanks, that worked great. Jerry Lake - jerryl@europa.com Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -----Original Message----- From: John Huggins [mailto:huggins@tls2000.com] Sent: Wednesday, March 07, 2001 2:49 PM To: Jerry Lake; php-general@lists.php.net Subject: RE: [PHP] on the list yesterday regarding mysql time Forget about the PHP functions and do this: $query = "INSERT INTO tablename "; $query .= "SET field1 = '$field1', "; $query .= "field2 = '$field2', "; $query .= "datesubmitted = NOW(); Let MySQL simply do this for you with the NOW() SQL command. > -----Original Message----- > From: Jerry Lake [mailto:jerryl@europa.com] > Sent: Wednesday, March 07, 2001 5:41 PM > To: php-general@lists.php.net > Subject: [PHP] on the list yesterday regarding mysql time > > > I know this was on the list yesterday, > but I for some reason erased it. > > I have an online form that I would like > to have record the time submitted and > recorded into a MySQL date field, how > the hell do I use the date and mktime > functions to make the date compatible > with the MySQL 0000-00-00 format? > > Jerry Lake - jerryl@europa.com > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.com

« previous php.general (#42967) next »