title: How record insert time in mysql database
body: <p>I want to remove a table row from my table new_data once the row is 45 mins old and then input it in another table called old_data.</p>
  
  <p>The only way i can think for this to work, it to query the database lets say every min and remove any row thats (current_time - time inserted) > 45 mins. </p>
  
  <p>Is there any other way of doing this? if not how could i set up a table to record inserted_time? </p>
  
  <h1>edit added</h1>
  
  <p>How could i write this statement to retrieve the correct data into the old_data table</p>
  
  <p><code>SELECT * FROM new_spots WHERE (NOW()-created_at)&gt;45mins</code></p>
  
  <p>and then insert the above into the old_data table</p>