title: Data from two tables with same column names
body: <p>I have a table for users. But when a user makes any changes to their profile, I store them in a temp table until I approve them. The data then is copied over to the live table and deleted from the temp table.</p>
  
  <p>What I want to achieve is that when viewing the data in the admin panel, or in the page where the user can double check before submitting, I want to write a single query that will allow me to fetch the data from both tables where the id in both equals $userid. Then I want to display them a table form, where old value appears in the left column and the new value appears in the right column.</p>
  
  <p>I've found some sql solutions, but I'm not sure how to use them in php to echo the results as the columns in both have the same name.</p>