title: MySQL SELECT statement where request parameter have more character than content in database
body: <p>Let say i have a table of <code>city</code> like below</p>
  
  <pre><code>+-----+-------------------------+------+
  | id  | city_name               | item |
  +-----+-------------------------+------+
  | 1   | kota jakarta            |  5   |
  | 2   | tangerang               |  6   |
  | 3   | kota tangerang selatan  |  7   |
  | 4   | kota tangerang          |  8   |
  </code></pre>
  
  <p>in this case, i will get string input for <code>SELECT</code> statement, for example :</p>
  
  <p>input = "<strong>kota jakarta barat</strong>" or "<strong>kota jakarta selatan</strong>" and i cant control the input, it come from web request.</p>
  
  <p>my question :</p>
  
  <p>(1) how to make <code>SELECT</code> query statement using above input to get exactly record result = "<strong>kota jakarta</strong>" ? </p>
  
  <p>i cant use <code>SELECT city_name FROM city WHERE city_name like %kota jakarta barat%</code> because it will return nothing.</p>
  
  <p>Thanks in advance...</p>