title: Sorting and Merging data from three different tables in an efficient way
body: <p>Consider the following three tables:</p>
  
  <pre><code>t1(id,name,cDate,foo,…)
  t2(id,name,cDate,bar,…)
  t3(id,name,cDate,other,…)
  </code></pre>
  
  <p>The tables represent some independent entities. I need to display them on site homepage regardless of their type in a list sorted by creation date (cDate).</p>
  
  <pre><code>rows
  ---
  t1
  t2
  t2
  t3
  t2
  t1
  </code></pre>
  
  <p>Currently I have created a view (or a subquery) by union of some shared columns and an auxilary column for table name: <code>v1(id,cDate,tableName)</code> to select them ordered by cDAte. After that I query on the each table to get tables' rows and merge the result in a PHP array and send back them to view. However I think it is not so efficient and clean. Is there any better approach? </p>
  
  <p><strong>The output be a ready-to-use resourse containing all data of the three tables.</strong></p>