Hi,
I want to create an auto creation date and update date in my mysql table. I am using the "MySQL Cookbook" approach, using the TIMESTAMP field which basically is:
- create 2 new fields in the table (t_create and t_update)
- both NULL
- when a new record is created they both will register a common timestamp
- when the record is modified the t_update will change, buit not the t_create
sounds EZ---funny I got it to work on another table --but not this one!
My problem is:
1) I can create 1 NULL TIMESTAMP field --using PhPMyAdmin 2.6. ---the 2nd NULL TIMESTAMP field auto enters '0000000000000000' not NULL in the field on creation---I try to change the field to NULL ...but it automatically reverts NULL to '0000000'...why?
2) My results are: one correct TIMESTAMP field ---changes with each modiifcation and one TIMESTAMP field which stays at '000000000' all the time
3) Funny---When "browsing" the record in PhPMyAdmin you are allowed to change the parameters of the TIMESTAMP field ---in that record only---and then I can get a TIMESTAMP (create and update) in both fields --- but only manually and after a new record is entered
I think this is a very EZ problem ---that is related to my misunderstanding about formatting TIMESTAMP fields and using PhpMyAdmin .....I hope to hear from you !
Thanks,
Newbie Jim