Try without this unset and without order by please. There should be no problem. Then you can also just use fetchrowset.