title: PHP, MySQL: Duplicate series of rows, but change 1 column?
body: <p>I have a table called scheduler_sched which has several columns, including a column called schedule_id. </p>
  
  <p>I need a function where I can pass 2 ids (copy_from_id, copy_to_id) as parameters. And what I need to do is take every row where schedule_id = copy_from_id AND duplicate it but change the copy_from_id to the copy_to_id</p>
  
  <p>So basically I want to to the equivalient of this:</p>
  
  <pre><code>UPDATE scheduler_sched SET schedule_id = 32 WHERE schedule_id = 28
  </code></pre>
  
  <p>Only I do not want to UPDATE any rows, I want to create duplicates with the new ID's </p>
  
  <p>Does this make sense?</p>
  
  <p>How can I do this?</p>
  
  <p>THANKS!</p>
  
  <p>(By the way schedule_id is not a unique/index field on this table)</p>