RE: [PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread John W. Holmes
> I'm trying to convert an ASP/Access tutorial to PHP/MySQL and have a > question regarding MySQL. > > In Access one can create a date field and set the default to "Date()" to > get > the current date but according to the mysql manual: > > http://www.mysql.com/doc/en/CREATE_TABLE.html > > > Defa

Re: [PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread David Smith
This can be done using the 'timestamp' type for your column. Note that this field will be updated to the current time any time the row is modified (including when it is created). An alternative is to do it on the scripting side with the MySQL NOW() command like so: INSERT INTO your_table (field1,

[PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread Michael Zornek
I'm trying to convert an ASP/Access tutorial to PHP/MySQL and have a question regarding MySQL. In Access one can create a date field and set the default to "Date()" to get the current date but according to the mysql manual: http://www.mysql.com/doc/en/CREATE_TABLE.html > Default values must be c