set @n1:=0;
/*peg_end*/

update t43
set p99=@n1:=@n1+1, 
    remdate=curdate(), 
    remtime=curtime(), 
    remuser='{user_pswd}'
where p00={peg_nr1}
order by p02, remfdate, remftime;
/*peg_end*/
    