title: Querying 2 tables using INSERT ON DUPLICATE UPDATE
body: <p>Is it possible to join two tables on a INSERT... ON DUPLICATE UPDATE statement. I am trying to dynamically printing out data from 2 tables. I have echo out data from one successfully into form fields. Half way through the process i have realised i also need data from another table.</p>
  
  <p>So i was wondering in the following statement:</p>
  
  <pre><code>$example_query = "INSERT INTO example(x,y) VALUES 
              (?,?)
           ON DUPLICATE KEY 
           UPDATE
           x = ?
           ,y = ?";
  </code></pre>
  
  <p>If i could also call another table, or what is the best practice for this.</p>