title: MySQL - Combining INSERT, VALUES, and SELECT?
body: <p>I'm kind of new to SQL, and I'm really only interacting with it enough to get a high score database working.  I'm using a php script to access my online MySQL db.  Anyways.</p>
  
  <p>What I have is 2 tables, Player and Score.  Player has an id, uniqueDeviceId, and chosenname.
  Score has the usual things youd expect.</p>
  
  <p>What I'd really like to do in a single query (to reduce complexity...) is to combine the syntaxes of </p>
  
  <pre><code>INSERT INTO scores VALUES
  and INSERT INTO scores SELECT...
  </code></pre>
  
  <p>Into some sort of monster, like</p>
  
  <pre><code>INSERT INTO scores(score,difficulty,playerid)
     VALUES(TheScoreThatImProviding,TheDifficultyThatImProviding, (SELECT 
         id FROM player WHERE uniqueDeviceId = TheUniqueIdThatImProviding)
       )
  </code></pre>
  
  <p>If that makes sense.  I want to lookup the playerId (3rd "value"), and mix the result of that select with the input of the VALUES provided.  </p>
  
  <p>Is this possible?  All the googling results ive found either have it all VALUES or all SELECT.</p>