title: Detecting spammers with MySQL
body: <p>I see an ever increasing number of users signing up on my site to just send duplicate SPAM messages to other users. I've added some server side code to detect duplicate messages with the following mysql query:</p>
  
  <pre><code>  SELECT count(content) as msgs_sent 
      FROM messages 
     WHERE sender_id = '.$sender_id.' 
  GROUP BY content having count(content) &gt; 10
  </code></pre>
  
  <p>The query works well but now they're getting around this by changing a few charctersr in their messages.  Is there a way to detect this with MySQL or do I need to look at each grouping returned from MySQL and then use PHP to determine the percentage of similarity?</p>
  
  <p>Any thoughts or suggestions?</p>