Wouldn't that just print:
Field1Value1----Field2Value1
Field1Value1----Field2Value2
Field1Value1----Field2Value3
Field1Value1----Field2Value4
etc?
Lets say you had a database of products and categories, where products.categories_id is the FK and products.ID is the pk, pretty common scenario.
Lets say I wanted to output a new column heading for each category, then output the products listed in that category, like:
Category1
-product1
-product2
Category2
-product1
-product2
Category3
-product1
[etc...]
Would I have to store the current value of the group by field, then check it during each iteration to make sure it hadn't changed yet, and when it did, output a new column heading? I can't really think of any other way to do it.