title: MySQL - How to ORDER BY RELEVANCE? INNODB Table
body: <p>I've got about 20,000 rows in an INNODB table called 'cards', so FULLTEXT is not an option.</p>
  
  <p>Please consider this table:</p>
  
  <pre><code>id     |     name     |     description
  ----------------------------------------------------------
  1        John Smith       Just some dude
  2        Ted Johnson      Another dude
  3        Johnathan Todd   This guy too
  4        Susan Smith      Her too
  5        Sam John Bond    And him
  6        John Smith       Same guy as num 1, another record
  7        John Adams       Last guy, promise
  </code></pre>
  
  <p>So, say the user searches for 'John', I want the result set to be in the order of:</p>
  
  <pre><code>7        John Adams
  6        John Smith
  3        Johnathan Todd
  5        Sam John Bond
  2        Ted Johnson
  </code></pre>
  
  <p>Please note that we've only pulled 'John Smith' once, we took his most recent entry. Due to my data, all names are for the same exact person, no need to worry about 2 different guys named John Smith.
  Ideas? Let me know if I can clarify anything.</p>