tyson.crouch 6 Junior Poster

G'day,

I've just been cleaning up some of my queries, and have opted to use a MySQL view for simplification of my queries, as i was using multiple queries to get the values that i wanted.

However, I cannot quite figure out how to iterate through the view.
My view is as follows: packageDetails(attID, packagePrice, pacID).

each package has 1 price, 1 ID and multiple attID's so i get the following

attID | packagePrice | pacID
1 | 200 | 1
2 | 200 | 1
3 | 200 | 1
-------------------
2 | 99 | 2
3 | 99 | 2
-------------------
4 | 120 | 3
5 | 120 | 3
-------------------
1 | 340 | 4
2 | 340 | 4
3 | 340 | 4
4 | 340 | 4
5 | 340 | 4

Now, i need to iterate through each pacID so i get 1,2,3,4,...

Assistance is much appreciated