Imagine I would like to get albums and their respective songs from a database and have them sorted; each one with a hyperlink of different sites so it gets to .
Example:
There's an Album "A" and the songs:
1. "One" (And by clicking I will be redirected to -> http://some_link.com/one?=blahrs)
2. "Two" (And by clicking I will be redirected to -> http://some_link.com/two?=blahrs)
3. "Three" (And by clicking I will be redirected to -> http://totally_diffe...com/one?=blahrs)
4. "Four"....etc...
And there's an album "B" and the songs:
"Track 1" (Same methodology as Album A)
"Track 2"
"Track 3"
I would like to store this info on a MySQL database, and retrieve them using PHP.
How my logic is up to right now:
Create MySQL columns with id, t_id, track, album, link
Where id is the default id mechanism in which the rows will be numbered in the Database.
Where t_id is the track number on the album;
Where track is the track name of the album
Where album is the name of the album
Where link is where I want to redirect to when clicked.
How I think I should proceed (but do not know how to)
Group each row of the table by Album first, in which many tracks will have the same album (I'm lost on how to do this).
Then to each different group, sort them via their t_id (Track number of the current album) (I'm lost on how to do this).
Display the information with their links (Easy part)
I'm planning to display them as follows:
Name goes here
1
Album track #1
Hyperlink #1
2
Album track #2
Hyperlink #2
I did not know how to Google this out....
Furthermore, am I approaching this problem correctly?
Thanks a lot and sorry for the long post.






