How to group result from a database query in a HTML page?

Discussion in 'Programming' started by ready2work, Oct 23, 2007.

  1. #1
    Let us say that I have two columns in my database one is for CourseName, and the other is for StudentsName. The CourseName column has repeated values. I want the results of a query to be displayed (grouped) something like,

    A Heading with Course Name and Student Name.
    Under the course name, I need only the CourseName to be printed once (which means the rowspan would be equal to the number of Students)
    The Student Name column would have all the students printed out for the particular course.

    This should go in a loop for each Course Name.

    How to do this formatting in HTML? I am using mySQL / JSP.
     
    If someone posts a solution, use the "Best Answer" link in their post to pick it as the best answer.
    ready2work, Oct 23, 2007 IP