- Nov 13, 2000
- 14,166
- 0
- 0
EDIT: I've decided to move the genre checking into the DB build/update routine. Check my last post for details
Original Post:
I'm in the process of writing an in-car media application, and i've come to displaying all the unique genres that you have within your music database.
I have a table called music, with a field called genreid, which has both the genre number (54, 36 etc), and text (ie Rock, Classical etc). I can pull in the distinct values from here and display them, but I really want to just display the text equivelents of the numerical genre id's.
I also have a table called genre which has a list of the ID3 genres id's, and their corresponding names.
Now, i'm a little stuck on how to compare the numbers from the music table to the genre table and pull out the text from the genre table, and make sure that I only display each unique text once.
I guess it's some kind of linking of the tables/searches, but my knowledge of SQL isn't enough to do this yet!
Thanks in advance!
Garry
Original Post:
I'm in the process of writing an in-car media application, and i've come to displaying all the unique genres that you have within your music database.
I have a table called music, with a field called genreid, which has both the genre number (54, 36 etc), and text (ie Rock, Classical etc). I can pull in the distinct values from here and display them, but I really want to just display the text equivelents of the numerical genre id's.
I also have a table called genre which has a list of the ID3 genres id's, and their corresponding names.
Now, i'm a little stuck on how to compare the numbers from the music table to the genre table and pull out the text from the genre table, and make sure that I only display each unique text once.
I guess it's some kind of linking of the tables/searches, but my knowledge of SQL isn't enough to do this yet!
Thanks in advance!
Garry