title: SELECT from various tables, with a list of indexes
body: <p>Here is the scenario.</p>
  
  <p>I'm developing a timeclock system; I have these tables:</p>
  
  <pre><code>-punch (id_punch,date)
  -in1 (id_in1,time,id_punch,...)
  -in2 (id_in2,time,id_punch,...)
  .
  -in6  (id_in6,time,id_punch,...)
  -out1 (id_out1,time,id_punch,...)
  -out2 (id_out2,time,id_punch,...)
  .
  -out6 (id_out6,time,id_punch,...)
  </code></pre>
  
  <p>My question is, how  can I with only one query in PHP to get all values from in and out table, from a list of id_punch values, for example:</p>
  
  <p>Get all punchs of September, or<br>
  Get all punchs of July to December, </p>
  
  <p>I mean... from a list of id_punch between two dates, get all the results from the in, out table.</p>
  
  <p>The only way I think is to do a query with each id_punch variable, but in a month its about 20-25 queries... to much?</p>