Jump to content

Archived

This topic is now archived and is closed to further replies.

appeland

mysql query help please

Recommended Posts

Hello,
since our local IT department does not allow us to have mp3's on our
workstations at work I have written a few php scripts that upload and stream
mp3's directly out of a mysql DB. The scripts work great and the performance is
also fine since it runs in the LAN and the IT department can scan themselfs silly, they will not
find any mp3's :)

However, one function still makes me headaches.
I want to make a drop-down box for artist and genre (making the drop down box itself is not a problem)
If I now do a select to the genre or artist column of the DB I obviously get the same artists and genre as often as it's there.

I have googled myself to bits now and just cant find an answer to this or I just dont know
what to search for.

Is there a query like [b]"select <column> from <table> but only one of each"[/b] :) ?

Thanks & Regards,
Andi


Share this post


Link to post
Share on other sites
thorpe, your're my hero for the day  ;D !

just in case someone wonders about this as well, here's a tutorial:
[url=http://www.tizag.com/mysqlTutorial/mysqlgroupby.php]http://www.tizag.com/mysqlTutorial/mysqlgroupby.php[/url]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.