title: MySQL, select records with at least X characters matching
body: <p>I am trying to accomplish the following. Let's say we have a table that contains these fields (ID, content)</p>
  
  <p>1 | apple</p>
  
  <p>2 | pineapple</p>
  
  <p>3 | application</p>
  
  <p>4 | nation</p>
  
  <p>now, I am looking for a function that will tell me all possible common matches. For example, if the argument is "3", the function will return all possible strings from 3 characters that appear in more then one record.</p>
  
  <p>In this case, I get "app","ppl","ple","ati","tio","ion"</p>
  
  <p>If the argument is "4", i get: "appl","pple","atio","tion"</p>
  
  <p>If the arugment is "5", i get: "apple","ation"</p>
  
  <p>If the argument is "6", nohting is returned.</p>
  
  <p>Untill now, I did not find a function that accomplishes this.</p>
  
  <p>Thx!</p>
  
  <p>Some extra information:
  I am using this in a PHP script with a MySQL database. I really just want to give the amount of characters as an argument and of course the table to search in.</p>