title: Select and then insert for each result
body: <p>I have this table:</p>
  <pre><code>Table name: `user_offer_rels`
  +----+--------+--------+-------+
  | ID | userID | permID | state |
  +----+--------+--------+-------+
  | 1  | 1      | 1      | 0     |
  | 2  | 1      | 2      | 0     |
  | 3  | 2      | 1      | 0     |
  | 4  | 2      | 2      | 0     |
  +----+--------+--------+-------+
  </code></pre>
  <p>And I want to insert a new record for each result from this query:</p>
  <pre><code>SELECT DISTINCT userID FROM `user_offer_rels`
  
  The results:
  +--------+
  | userID |
  +--------+
  | 1      |
  | 2      |
  +--------+
  </code></pre>
  <p>So for each one of that userID's I need to make something like this:</p>
  <pre><code>INSERT INTO `user_offer_rels` (userID, permID, state) VALUES (`the userID record from above`, 4, 0)
  </code></pre>
  <p>I have too much records so I cant make that insert one by one.</p>
  <p><strong>EDIT:</strong></p>
  <p>Desired Results of what that <code>user_offer_rels</code> table would look like after this INSERT runs:</p>
  <pre><code>+----+--------+--------+-------+
  | ID | userID | permID | state |
  +----+--------+--------+-------+
  | 1  | 1      | 1      | 0     |
  | 2  | 1      | 2      | 0     |
  | 3  | 2      | 1      | 0     |
  | 4  | 2      | 2      | 0     |
  | 5  | 1      | 4      | 0     |
  | 6  | 2      | 4      | 0     |
  +----+--------+--------+-------+
  </code></pre>