title: MYSQL Finding substring when column contains needle
body: <p>How can I find a string in my database if the database contains the needle?</p>
  
  <p>For example I have the string:
  "www.example.com/test"</p>
  
  <p>My database column urlColumn contains:
  "www.example.com"</p>
  
  <p>If I do the following (pseudo):</p>
  
  <pre><code>SELECT * FROM db WHERE urlColumn LIKE '%www.example.com/test%'
  </code></pre>
  
  <p>I don't get a result. If I change it to (pseudo):</p>
  
  <pre><code>SELECT * FROM db WHERE urlColumn LIKE '%www.example.com%'
  </code></pre>
  
  <p>It works. Is it true that the element after LIKE must be the needle and not the haystack? Is it possible to do something like this (pseudo):</p>
  
  <pre><code>SELECT * FROM db WHERE %urlColumn% LIKE 'www.exmaple.com/test'
  </code></pre>