How record insert time in mysql database -
How record insert time in mysql database -
i want remove table row table new_data 1 time row 45 mins old , input in table called old_data.
the way can think work, query database lets every min , remove row thats (current_time - time inserted) > 45 mins.
is there other way of doing this? if not how set table record inserted_time?
edit addedhow write statement retrieve right info old_data table
select * new_spots (now()-created_at)>45mins
and insert above old_data table
you can specify value of time column upon insertion:
insert x (created_at) values (now());
additionally can setup view
show recent entries.
mysql database timestamp
Comments
Post a Comment