title: Union select with CakePHP
body: <p>This is a two part question. I found <a href="https://stackoverflow.com/questions/3536107/union-syntax-in-cakephp">something similar</a>, but it was more complicated with more tables and used joins making it much more complex and difficult to translate to my more simplified situation. Also, it doesn't cover the second part of my question.</p>
  
  <p>This takes place in my OrdersController. I have also have ArchivedordersControler and ArchivedOrder model</p>
  
  <ol>
  <li><p>I'm trying to search for an email address in two different tables(orders and archived_orders). I don't need to join anything (at least I don't think I have to). Both tables have the exact same structure, one is just for archived values.</p>
  
  <p>With MySQL I'd just do something like</p>
  
  <pre><code>select * from orders where orders.email = '$email'
  Union
  select * from archived_orders where archived_orders.email = '$email'
  </code></pre></li>
  <li><p>How can I add some sort of identifier to know which table it was selected from? The email can appear in both tables but the options displayed based on which table it was pulled from will be different.</p></li>
  </ol>