title: SQL insert and update in the same time
body: <p>Hey I have a query that will insert into the table a new data and I want that in the same time update an outher table with the id of the new data that I have entered. ex:</p>
  
  <pre><code>mysql_query("INSERT INTO `test` (`name`) VALUES ('Mark')");
  $query = mysql_query("SELECT `id` FROM `test` WHERE `name` = 'Mark'");
  $id = mysql_result($query,0);
  mysql_quey("UPDATE `test2` SET `test_id` = $id WHERE `name` = 'Mark'");
  </code></pre>
  
  <p>How do I do it at same time? because doing it this way I only insert the new data and I dont update the other.</p>
  
  <p>Cumps.</p>