I am using phpMyAdmin
for my project and I have a table without date/datetime
field.
I am wondering if there's a way to know when I inserted each record on the database
I am using phpMyAdmin
for my project and I have a table without date/datetime
field.
I am wondering if there's a way to know when I inserted each record on the database
While designing your database if you forgot to keep an extra field to store the insertion time of a row then you have only one option left to know the the insertion time.
But the condition is you must have binary logging enabled prior to it.
You may check if binary logging is enabled in your part by executing this query :
SHOW VARIABLES LIKE 'log_bin';
Further Note:
And from now on you may keep an extra field which will track the insertion time of each row.
Change your table design :
Add an extra field in your table with datatype "timestamp/datetime" with default value CURRENT_TIMESTAMP
and on update CURRENT_TIMESTAMP
.