wondering if anyone could help me, i'm trying to help a friend quickly on a project, and i'm terrible at recursive functions
i have a table of 'genres' for music club 'venues' - each genre can have a 'parentID' if it is a sub-genre of another genre
really roughly he has something like this -
genre ----- [genreID] name parentID
venue ----- [venueID] name
venure_genre ------------ [venueID genreID]
I'm trying to help him build a form to submit venues into a database and assign them 1 or more genres -
i'd like to have the genre selection be a multiple select box, with subgenres spaced over with 's i.e.
I don't really need any help with the output as much as the query - I could do this the long way, and query all the top level genres, store them, then query each top level's sub genre's, etc etc, but i was wondering if anyone with experience writing recursive SQL querys/PHP functions could lend a hand