Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012

    Unanswered: Need help to print out multiple data in one column


    i want to retrieve data from database and print it in a table in the same filed

    i've two tables in the database one is called : Student
    and the other is called course

    Student have rows (Student_name , ID , Course_id)
    Course have rows (Course_name , Course_id)

    i want to retrieve Course name with all students that are taken it
    such as

    Course Name Student Name
    Math101 John , Mily , Mike .. etc

    what kind of query i should write ? and how to make table that print so many data in one filed ?

    thank you

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    you have two separate elements there
    one is how do you retrieve the data
    the other is how you present it

    the retrieval is trivial
    use a SQL statement that selects all students attending a specific course
    stuff that data into a single variable

    the presentation is trivial
    create a table
    add row headings as required
    on change of course int he SQL processing above
    write out values to the table and write the students variable ot the table
    reset the students variable
    move on to the next course
    remembering to write the final course table row and then close off the table
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts