title: MySQL use select query result in another query with logical OR
body: <p>Need some help to construct this query.</p>
  
  <pre><code>Q1 = select fruits from tableA;
  </code></pre>
  
  <p>Result: apple, banana, orange</p>
  
  <pre><code>Q2 = select * from tableB where (fruitname = 'apple' OR fruitname = 'banana' OR fruitname = 'orange');
  </code></pre>
  
  <p>How can I combine both the above queries into a single query?
  And is it efficient to run a combined query versus 2 individual queries.</p>
  
  <p>The script is written in PHP.</p>
  
  <p>Thank you.</p>