On Tue, Dec 17, 2002 at 03:51:03PM +0000, James Gregory wrote: > On Tue, 2002-12-17 at 04:41, Tony Green wrote: > > Your using 'INSERT INTO blah VALUES( 'blah','blah','');' and it doesn't > > work. Try 'INSERT INTO blah VALUES( 'blah','blah',NULL);' and see if > > you get any better results. > > I've also had issues with it, but if you want it to try it then > specifying a value for it won't let it set it itself. > > If it is going to work, the way to do it will be to not specify that > field at all in your list of fields to insert into. It's supposed to > operate like a default value essentially. If you specify something else > it will use that. both NULL and the empty string are "something".
Nope, that's wrong. Not inserting the field OR inserting NULL are equivalent for timestamps - both set it to the current time. But '' and '\n' won't work - you have to use NULL proper. I've never had any problems like this with timestamps. What version are you using Michael? You're absolutely sure you're inserting null and not a quoted 'null'? Cheers, Gavin -- Open Fusion P/L - Open Source Business Solutions [ Linux - Perl - Apache ] http://www.openfusion.com.au - Fashion is a variable, but style is a constant - Programming Perl -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
