Recordsets cannot be returned in a single command to my knowledge.
Looping is a standard practice - even on webforumz.
If there was a
PHP command (which there may well be) there will STILL be a loop happening except you wont see it, and if the loop didnt happen in
PHP, then it would happen on the database.