title: MySQL: select the closest match?
body: <p>I want to show the closest related item for a product. So say I am showing a product and the style number is SG-sfs35s. Is there a way to select whatever product's style number is closest to that?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: to answer your questions. Well I definitely want to keep the first 2 letters as that is the manufacturer code but as for the part after the first dash, just whatever matches closest. so for example SG-sfs35s would match SG-shs35s much more than SG-sht64s. I hope this makes sense whenever I do <strong>LIKE product_style_number</strong> it only pulls the exact match.</p>