title: MySql Insert to multiple tables based on the ID generated in the first table
body: <p>I have three tables in my database. A users table, StoreA and StoreB</p>
  
  <p>StoreA and StoreB both have a unique key which is the user ID value. </p>
  
  <p>What I want is; When I create a user and insert them into the database, how can I Insert a row into the other two tables without too many additional queries.</p>
  
  <p>I figure I can do this by inserting the user in one query,
  then in another return the newly created user ID,
  then in another, using said ID, create rows in StoreA and StoreB</p>
  
  <p>Can I cut out the middle query?</p>