PDA

View Full Version : [asp classic] Esempio base di menù gerarchico


_Mara_
06-05-2016, 15:31
Buongiorno a tutti,
ho 2 tabelle Studenti e Materie così strutturate:
tab_studenti
pk_studente | cognome
tab_materie
pk_materia | materia

Vado a scrivere in una 3^ tabella:
tab_programmi
pk_programma | fk_studente | fk_materia

Tramite join ottengo come risultato:
1 | rossi | storia
1 | rossi | geografia
1 | rossi | amtematica
2 | bianchi | storia
2 | bianchi | geografia
3 | verdi | algebra

Vorrei però un risultato strutturato ad albero che anche a livello visivo sia esplicativo, come nel seguente modo:
rossi******storia
*********geografia
*********matematica
bianchi****storia
*********geografia
verdi******algebra

Sarà banale ma non riesco :(
Grazie dei suggerimenti!

Mara

P.S. ho usato gli asterischi perchè gli spazio vuoti non rendevano ciò che vorrei