title: Searching for sub-strings in mysql
body: <p>I know that if I were to search for a substring in a mysql cell, I can do something like the following</p>
  
  <pre><code>Select * from table_name where column_name like '%search_string%';
  </code></pre>
  
  <p>How do I perform the search if the cell values are the search strings? For example, if I have the following table,</p>
  
  <pre><code>ID  String
  1    abc
  2    def
  3    ghi
  </code></pre>
  
  <p>And I have the string "123abc567", I want to be able to search the table so I get the result ID = 1. What mysql statement should I use, or do I have to read row by row and then do a strstr() in my program?</p>