function tool_id2($tbl) {

  global $db,$ar;

  $sql = select * from .$tbl. order by id;

  $res = mysqli_query($db, $sql);

  $id2=1;

  while($rw = mysqli_fetch_assoc($res)) {

    $udt=array(

      id2=>$id2,

    );    

    Update($db,$tbl,$udt,id=.$rw[id],0);

    $id2++;

  }  

}