 <p>check below query, I tried below eg. and it is working fine for me,</p> <pre><code>SELECT users.*, threads.* FROM users, threads WHERE users.Username LIKE '?' OR threads.Name LIKE '?' </code></pre> <p>eg.</p> <pre><code>select p.name,bi.mrp from billitem bi,product p where p.name like 'a%' or bi.productname like 'ta%' </code></pre>