Re: timestamp additional info-SOLVED

2001-12-14 Thread Steve Osborne
Thanks, it is working perfectly as described Steve > Don't reference the timestamp column at all in your INSERT (or future > UPDATE) statements and the timestamp should update just fine on its own. > > i.e. > INSERT INTO Owners (NameID,ProductsKey,RegNum) > VALUES ('$NameID','1','$RegNum

RE: timestamp additional info

2001-12-14 Thread Matthew Smith
mysql> CREATE TABLE tblTEST ( -> KeyValue int(10) NOT NULL default 0, -> DataValue varchar(255) default NULL, -> LastEdited timestamp(14) NOT NULL, -> PRIMARY KEY (KeyValue) -> ); mysql> insert into tblTEST (KeyValue, DataValue) values( 1, 'Hello'); Query OK, 1 row affect

Re: timestamp additional info

2001-12-14 Thread Gerald Clark
You are inserting the string 'NULL' Don't include it at all in the insert. Steve Osborne wrote: > Timestamp additional info: > > INSERT INTO Owners (NameID,ProductsKey,RegNum,ProdRegDate) > VALUES ('$NameID','1','$RegNumc','NULL'); > > ProdRegDate is the field that I want to timestamp. (Again,

Re: timestamp additional info

2001-12-14 Thread Chris Cooper
Don't reference the timestamp column at all in your INSERT (or future UPDATE) statements and the timestamp should update just fine on its own. i.e. INSERT INTO Owners (NameID,ProductsKey,RegNum) VALUES ('$NameID','1','$RegNumc'); BTW, you cannot change the default for a timestamp column - it is