Maikel D Mon Feb 28 06:41:36 -0500 2011

Subject: Order of results

Hello All.

My experience with PHP.AC isn't very high, I'm still learning.

I have a lyrics website and I have db tables for them ( Artists, Albums, Songs ).
The relations are set up properly ( artists has many albums, albums belongs to artists.. etc ), and the data loads. No issues there.

One of my pages show an artist's albums and songs.
What I want is to have my albums ordered by album year, and the songs for each album ordered by song track.

I tried setting the order in the relations ( artist has many albums, order by year ). I followed the instructions in the wiki (http://www.phpactiverecord.org/projects/main/wiki/Associations, last code example under the 'has_many' title).

Any help?

Thanks,
Maikel