Check Query for DateTime being X seconds ago
<p>I am using PHP and MySQL to create a flood-filter for my forums I've recently created and I did research this, but little results came and only one of them potentially brought me further to my resolution.</p>

<p>This is the code</p>

<pre><code>$overview_threads = mysql_query("SELECT * FROM `forum_posts` WHERE `author`='".$_SESSION['username']."' AND TIMESTAMPDIFF(SECOND, `created`, now()) &lt;= 20");
</code></pre>

<p>The code is made in attempt to select a thread made by the user within an interval of 20 seconds or less and then do an if statement to prevent the user of posting within that time.</p>

<p>What do I do for this?</p>
