in reply to Sorting data pulled in by DBI
Once you've got that, you could set up your output loop so that it compares the current value of college to the one in the previous record; if it's different, you print a header with the new information. Something like this (untested):
my $college_last =''; while (@row = $sth_report->fetchrow_array) { # assign $student_name etc. print "<h1>$college</h1>" if $college ne $college_last; $college_last = $college; # print the actual record contents }
|
|---|