Re: [PHP] inserting timestamp into mysql field

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 09:29:21 +0100, Chris Dowell <[EMAIL PROTECTED]> wrote: > That's not 100% correct > > If you have more than one TIMESTAMP field only the first (IIRC) will be > filled with the current time - other TIMESTAMP fields will only be filed > if you set them = NULL. > You're absolute

Re: [PHP] inserting timestamp into mysql field

2004-09-22 Thread Chris Dowell
That's not 100% correct If you have more than one TIMESTAMP field only the first (IIRC) will be filled with the current time - other TIMESTAMP fields will only be filed if you set them = NULL. This is true of MySQL < 4.1.2 - there is more fine-grained control over the behaviour from 4.1.2 onwar

Re: [PHP] inserting timestamp into mysql field

2004-09-21 Thread Andrew Kreps
On Tue, 21 Sep 2004 16:25:37 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i need to insert a current timestamp into a mysql field when a form is posted. > can anyone suggest a simple way of doing this? Here's the MySQL answer: If you have a (data type) timestamp field in your table, you d

RE: [PHP] inserting timestamp into mysql field

2004-09-21 Thread Chris Gregors
sql compatiable date/time stamps. Then do the sql insert/update of your record. -Original Message- From: Chris Dowell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 10:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] inserting timestamp into mysql field Not really a MySQL q

Re: [PHP] inserting timestamp into mysql field

2004-09-21 Thread Chris Dowell
Not really a MySQL question - the answer happens to be MySQL, but the question asks how to do it in PHP This might still be necessary if the OP is using something like DB_DataObject, as you can't really use NOW() in that situation Try strftime [ http://uk.php.net/strftime - RTFM :) ] - a good f

Re: [PHP] inserting timestamp into mysql field

2004-09-21 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: Subject: inserting timestamp into mysql field hi there, i need to insert a current timestamp into a mysql field when a form is posted. can anyone suggest a simple way of doing this? i would like to set a variable in my php script to add into the insert statement. it needs t