title: Concatening LIKE with Stored Procedure's parameter using MySQL
body: <h2>The goal</h2>
  
  <p>Concatenate a parameter with a <code>%</code> operator of LIKE using MySQL.</p>
  
  <h2>The problem</h2>
  
  <p>There's the following query on my database and it returns me the results very well:</p>
  
  <pre><code>SELECT people.LOGIN, people.EMAIL FROM people
  WHERE people.LOGIN LIKE 'o%'
  ORDER BY people.LOGIN ASC
  LIMIT 10;
  </code></pre>
  
  <p>But I want to call this function using a Stored Procedure, and instead of use <code>'o%'</code>, I want to use <code>'&lt;myvariable&gt;%'</code> and I'm not managing to do this.</p>
  
  <h2>The scenario</h2>
  
  <p>I've tried the following on my procedure:</p>
  
  <pre><code>BEGIN
      SELECT people.EMAIL FROM people
      WHERE people.LOGIN LIKE CONCAT(expression, '%')
      ORDER BY people.LOGIN ASC
      LIMIT 10;
  END
  </code></pre>
  
  <p>The result? <strong>Empty.</strong> This query returns me nothing.</p>
  
  <p><strong>Someone has any idea to help me?</strong></p>