Urutan Pembaruan MySQL dengan pesanan oleh
SET @rank:=0;
update tablename
set fieldname =@rank:=@rank+1 ORDER BY fieldorder;
#OR
UPDATE tablename
JOIN (SELECT @rank := 0) r
SET fieldname=@rank:=@rank+1 ORDER BY fieldorder;
Matteoweb