title: Get records from database which is 5 minutes from current time
body: <p>I have a timestamp column in mySQL database and a table called <code>alerttime</code> - which has records in the current format <code>2018-09-06 15:59:00</code></p>
  
  <p>I want to run a query that just shows records that are 5 minutes from the current time and date (in advanced). for example if the time right now was 15:55 - it would show the record with the time (2018-09-06 15:59:00)</p>
  
  <p>Does anyone know how to achieve this?</p>
  
  <pre><code>SELECT *
    FROM (`todolist`)
    WHERE `type` = '2' AND
          user_id = '1' AND
          DATEADD(minute, -5, GETDATE())
  </code></pre>
  
  <p>I tried the above but i think it's not the right way of doing it, i just found it in a forum somewhere</p>