I am trying to use REPLACE INTO to update a table. It is working fine but I would like to have 2 fields: datetime - Added to table datetime - Updated The Updated datetime is fine but I cant work out how to not 'update' the Added to Table field. I just want a field that records the datetime that the record was first added to my table. Any ideas? Thanks
Cheers for the reply. I eventually came up with the following solution: INSERT INTO myTable ( data.......... CreateTime Now())ON DUPLICATE KEY UPDATE (data............UpdateTime Now()) So INSERT into myTable if the Primary Key Duplicate error UPDATE the myTable. So I dont need to see if a record exists before choosing to INSERT or UPDATE.