Actually, it sounds like your 'XXX' is
$pointer->{"id"}.
The problem is that you are changing that while you're updating, and it's not going to work.
You need something like
Update ID
SET ID = (select rownum from request );
(except that doesn't work)
You are trying to set the id of each row to be it's rownum in the way it is selected in your original query, neh?
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs