title: Query MySQL LIKE with dot separator
body: <p>i have field in mysql type varchar with field data contains code, and the code is like tree structure with dot (.) as separator between parent and child.</p>
  
  <p>Example <code>1215</code> has child <code>1215.001</code> and <code>1215.002</code></p>
  
  <p>And this is the data each row on database</p>
  
  <pre><code>ID  | kode
  1   | 1215
  2   | 1215.001
  3   | 1215.001.001
  4   | 1215.002.001
  5   | 1215.002
  6   | 1215.002.001
  </code></pre>
  
  <p>How to get the level 2 code?<br>
  which its mean will be only the code <code>1215.001</code> and <code>1215.002</code></p>
  
  <p>Already tried with this query  </p>
  
  <pre><code>select * from `kegiatan` where `kode` LIKE '1215.%';
  </code></pre>
  
  <p>But it get all the code start with <code>1215</code> eg: <code>1215.001.001</code></p>