title: MySQL Select same field name from two tables using UNION
body: <p>I have two tables and I'm trying to pull values from each table using the same query.  It's for an autocomplete box where the user could type in either a title or a genre.  </p>
  
  <p>I'd like to know whether a row is from the items_table or the item_genres_table.  The following isn't working.  It's returning all rows from both tables but the key for every row is item_title instead of some being item_genre as expected.</p>
  
  <pre><code>SELECT name as item_title FROM items_table 
  WHERE name LIKE ? 
  UNION
  SELECT name as item_genre FROM item_genres_table
  WHERE name LIKE ?
  </code></pre>
  
  <p>I have no control over database fields so I'm stuck with <code>name</code> in both tables.</p>