hi,
how to check the timestamp for every new row created ?
| SitePoint Sponsor |
hi,
how to check the timestamp for every new row created ?
Same query as before, only add DEFAULT CURRENT_TIMESTAMP
example:
ALTER TABLE `YOUR_TABLE` ADD `current_ts` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
Now it will update value on each new insert and on each update
Bookmarks