title: Mysql: find string with most matching starting characters
body: <p>I have a problem I would like to know if I can tackle in my mysql query.</p>
  
  <p>I have a list of "names" in my DB:
  <code>id=1, name="name1"</code>
  <code>id=2, name="name11"</code>
  <code>id=3, name="name111"</code></p>
  
  <p>I would like to get the id of the name in db with the most common characters at the beginning.</p>
  
  <p>=> <code>name111someignorechar would return 3</code></p>
  
  <p>=> <code>name11someignorechar would return 2</code></p>
  
  <p>=> <code>name1someignorechar would return 1</code></p>
  
  <p>Any idea?</p>
  
  <p>If I use the LIKE keyword,
  SELECT id FROM names WHERE CONCAT(name,"%") LIKE "name111someignorechar"
  It will return me 3 results !</p>