title: How to search values from multiple tables using wildcards?
body: <p>I'm doing wild card searching with JDBC.</p>
  
  <p>The code is working fine when I use a single table.</p>
  
  <p>When I try to combine multiple tables using a wild card search, the code doesn't work.</p>
  
  <p>For example, the user may search  any keyword.</p>
  
  <ol>
  <li>if the user searches for "<em>cricket</em>", the cricket keyword is availble in the sports table</li>
  <li>if the user searches for "<em>windows 8</em>", it is available in the software table </li>
  <li>if the user searches for "<em>google, yahoo</em>", the keywords are available in the website table</li>
  </ol>
  
  <p>Here is the dynamic input value:</p>
  
  <pre><code>where s1(cricket,windows 8,google)
  </code></pre>
  
  <p>In the single table search I look for "<em>cricket</em>" in the sports table.</p>
  
  <p>Here is my query, which works fine:</p>
  
  <pre><code>"select * from sports WHERE feed LIKE '%" +s1 + "%'";
  </code></pre>
  
  <p>My multiple table query does not work.</p>
  
  <pre><code>    "select * from  product  WHERE sitename LIKE '%"+s1+"%'" "OR 
  
      "select * from  sports     WHERE sitename LIKE '%"+s1+"%'" " OR
  
      "select * from  website  WHERE sitename LIKE '%"+s1+"%'" " OR
  
      "select * from  software  WHERE sitename LIKE '%"+s1+"%'" "OR
  
      "select * from   other   WHERE sitename LIKE '%"+s1+"%'"
  </code></pre>
  
  <p>What is wrong with this code?</p>