title: MySQL Multiple LIKE between multiple table
body: <p>I had search for the solution but so far i didn't find it yet.</p>
  
  <p>So here the problem, let say i have 2 table:</p>
  
  <p>Table1</p>
  
  <pre><code>name | code
  -------------------
  a    | [a][b][c]
  b    | [a][c][d]
  c    | [a][e]
  </code></pre>
  
  <p>Table2</p>
  
  <pre><code>code | name
  -------------------
  a    | aaaa
  b    | bbbb
  c    | cccc
  d    | dddd
  e    | eeee
  </code></pre>
  
  <p>I want to do multiple select <code>Table1.name</code> and <code>Table2.name</code> where <code>Table1.code LIKE '%b%'</code> OR <code>Table1.code LIKE '%e%'</code></p>
  
  <p>so it should be result like this:</p>
  
  <pre><code>name | name
  ------------------
  a    | aaaa
  c    | cccc
  </code></pre>
  
  <p>I did try :</p>
  
  <pre><code>SELECT Table1.name, Table2.name 
  FROM Table1, Table2 
  WHERE Table1.code LIKE '%b%' OR Table1.code LIKE '%e%'
  </code></pre>
  
  <p>But it didn't work. I'm newbie on this, any help deeply appreciated :) </p>