title: MySQL compare two datetimes with date_add
body: <p>It's about schedule. User select 1 datetime and I need to compare it with DB, if I don't have something else in that time and +-2 hours (rounded)..</p>
  
  <p>Both datetime are saved in SQL "DATETIME" format (yyyy-dd-mm hh:mm:ss)</p>
  
  <p>Conditions are: user-DATETIME can't be more or less then 1 HOUR and 59 MINUTES (7199 SECONDS) as DB-DATETIME</p>
  
  <p>I try following:</p>
  
  <pre><code>SELECT event FROM schedule
  WHERE '2014-08-02 12:00:00' &gt; DATE_ADD(event, INTERVAL -7199 SECOND) OR
  WHERE '2014-08-02 12:00:00' &lt; DATE_ADD(event, INTERVAL +7199 SECOND)
  </code></pre>
  
  <p>that fixed datetime in this example is for checking.. the real datetime is in string $_COOKIE["userdt"]. Pretty sure I'm close, but can't accomplished.</p>