title: PHP MySQL - Move record to another table, Select, Insert, Delete
body: <p>I have two tables with the same structure. Iam attempting to move an entire record from one table to another and then delete from the source table. If i execute the two statements seperately it works, i.e. select and Insert 2. Delete.</p>
  
  <p>How could I combine these two sql statments so that both statements are within one, and can be esxecuted one after another. Here is mysql statement so far, Its not executing</p>
  
  <pre><code>$q="  INSERT INTO archived (SELECT * FROM table1 WHERE id='$id') ;
  
  DELETE FROM table1 WHERE id='$id'; ";
  </code></pre>