title: PHP MySQL Delete Rows older than 1 minute
body: <p>Sorry for this post that has many answers, but I'm spinning my wheels and am out of ideas. Really simple: delete all records older than 1 minute:</p>
  
  <pre><code>function deleteExpiredKeys ($link) {
  
      $date = date("Y-m-d H:i:s");
      $time = strtotime($date);
      $time = $time - (60);
      $date = date("Y-m-d H:i:s", $time);
  
      $sql = 'DELETE from Session_Keys
              WHERE updated_at &lt; ' . $date;
  
      $result = mysqli_query($link, $sql);
  
      if (!$result) return false;
  
      return true;
  }
  </code></pre>
  
  <p>'updated_at' is a <code>datetime</code> field.</p>
  
  <p>This doesn't throw any errors, but it doesn't delete anything either. I've tried many different things, most of them more elegant than what I am posting here, but nothing works. Can anyone help me? Thank you.</p>