| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | September 19 2002 1:37am |
| Subject: | Re: date field - default value = current date | ||
| View as plain text | |||
At 1:32 -0700 9/18/02, neal wrote: >Is there a wat to have mySQL auto fill in the current date into my >dateCreated field? > >In SQLServer I would simply specify the getDate() method as a default value. >I presume I would use the analogous MySQL function curDate() but it does not >appear to work for me. It's better to read the manual than to presume. In this case, the presumption is incorrect. Default values in MySQL must be constants. However, you might find the TIMESTAMP column type helpful. I'll let you read about it in the manual. :-) http://www.mysql.com/doc/en/DATETIME.html > >Any suggestions?
| Thread | ||
|---|---|---|
| • Connect to Database over the Internet | Bryan | 18 Sep |
| • determine value of auto-increment field after adding record - @ runtime | neal | 18 Sep |
| • date field - default value = current date | neal | 18 Sep |
| • Re: date field - default value = current date | Mikhail Entaltsev | 18 Sep |
| • re: date field - default value = current date | Egor Egorov | 18 Sep |
| • Re: date field - default value = current date | Paul DuBois | 19 Sep |
| • Re: determine value of auto-increment field after adding record - @ runtime | peter.brawley | 18 Sep |
| • re: determine value of auto-increment field after adding record - @ runtime | Egor Egorov | 18 Sep |
| • RE: Connect to Database over the Internet | Jindo | 18 Sep |
| • RE: Connect to Database over the Internet | Bryan | 19 Sep |
| • RE: Connect to Database over the Internet | Mike Hillyer | 18 Sep |
