title: SQL Query increment 1 from last row?
body: <p>since you can't auto increment two columns what would the Query be to get the last row of the table and +1 value of the column to insert a new row.</p>
  
  <p>For example I have a table named <code>players</code></p>
  
  <p>looking abit like this:</p>
  
  <pre><code>id    player_id    player_name
   1      15           name1
   2      16           name2
   3      17           name3
  </code></pre>
  
  <p>I'm trying to make an admin panel to create a player from a form, the column 'id' auto increments but I also need player_id to increment too, but id and player_id are not the same as each other.</p>
  
  <p>A query similar to this (I made this up so you can understand a little better)</p>
  
  <pre><code>$sql="select top 1 * from `players`  order by id desc";
  $result =mysql_query($sql);
  while ($data=mysql_fetch_assoc($result)){
      $playerid=$data['player_id'];
      Insert into `players` (`player_id`,`player_name`) VALUE ('$playerid' + '1', 'name4');
  
  }
  </code></pre>