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
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
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,
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