title: mysql insert with a select
body: <p>I am writing in PHP a mySQL query.  I would like to duplicate a row in a table in the database.  I would also like to insert a time stamp as to when that duplication happened with the NOW() function.</p>
  
  <p>If I had a table named 'people' stuctured with the fields:</p>
  
  <pre><code>id, name, phone, dateCreated
  </code></pre>
  
  <p>and I wanted to duplicate this record I would do the following:</p>
  
  <pre><code>INSERT INTO people (id, name, phone, dateCreated)
  SELECT id, name, phone, dateCreated 
  FROM people 
  WHERE id = '$id'
  </code></pre>
  
  <p>This will duplicate the record identified by the $id.  I would like to do this same concept but instead of copying the dateCreated, I would like the query to insert the current datetime via the NOW() function but I am not sure how to structure this type of query.</p>
  
  <p>Something like:</p>
  
  <pre><code>INSERT INTO people (id, name, phone)
  SELECT id, name, phone
  FROM people
  WHERE id = '$id'
  (dateCreated) value (NOW())
  </code></pre>
  
  <p>How would I structure the query?</p>