There are a few options here.

First off, when making the query, just put the NOW() statement into the
table....it's only a few extra keys to type, and it really isn't that
difficult.

The second option is using the TIMESTAMP type...take a look, it's probably
what your looking for :)

----- Original Message -----
From: "Sreevatsava Varada" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:03 PM
Subject: Doubt


Hi,

   I've recently moved from MS-SQL Server 7.0 to mySQL. In MSSQL I used to
give the default value 'GetDate()' for a field in the database with the
datetime datatype. In mySQL I tried using Now(). But when I insert a new row
the datetime field is taking 0000:00:00 00:00:00 value. Please let me know
what should I give as the default value for 'record_date' field (of datetime
datatype) so that it takes the value returned by Now() function when a new
row is inserted using php script.


Thanks.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to