On Sun, 18 Apr 2004 14:42:51 -0400, Michael Stassen wrote: > Stormblade wrote: > >> On Sun, 18 Apr 2004 12:17:00 -0400, Michael Stassen wrote:
> Functions are evaluated by the server. The client only sends queries and > receives results. So, CURDATE() and NOW() are server time, not client time. Goodness! > > But, you need to know that MySQL behaves differently than you expect with > respect to NOT NULL columns. Because it supports non-transactional table > types, every column in MySQL has a default value, even NOT NULL columns. Not Goodness. :( > Hence, if you leave out the date column in an insert, it will get the > default value rather than throwing an error. Oh geeze. So not only can I not set current date/time as a default but it will stick something in there for me anyway? Not cool. At least not for my purposes. I don't like the idea of having possible invalid data in my database. So what value gets put in their by default if I don't specify a default value? Last time I think I saw all zeroes or something when I was trying to put a function in there. > You will only get an error if > you explicitly try to set a NOT NULL column to NULL. See the manual > <http://dev.mysql.com/doc/mysql/en/constraint_NOT_NULL.html> for more. You > will need to have your app ensure that the date column is set, or have it > automatically replace empty input with NULL to get an error. Thanks for the link. I'm still new to MySQL. When I say new I mean I started playing with it late last week like Thursday. I'd downloaded/printed and read a tutorial on MySQL but that didn't help me much. Especially since the tutorial was command line and I'm using a GUI. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Stormblade (Shaolin Code Warrior) Software Developer (15+ Years Programming exp.) My System: http://www.anandtech.com/mysystemrig.html?rigid=1683 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]