Jump to content

Class Application - Registers


chwebdesigns

Recommended Posts

Hi,

 

I am writing a class application, where students are assigned to a class in a mysql database such as:

 

id                      student_name                      class_assignment

001                    A Student                              1

002                    B Student                              2

003                    C Student                              1

004                    D Student                              1

.... etc.

 

what I want to be able to do is print a table off for each class. I know I could do this individually with an sql such as

 

<?php
$sql = "SELECT * from classes where class_assignment='1'";
?>

 

But what I would like to be able to do is 'report' class 1 register have a page break, then class 2 register etc. in one click - I am unsure at the moment how many classes there are going to be. Is this possible?

 

Hope this makes sense?

 

Many thanks in advance,

Cal

Link to comment
Share on other sites

Thanks for the quick reply  :)

 

I am wanting the output to be in a table for example.

 

So if I order by class_assignment that will list all classes in the one table, where each class needs to be in a separate table on the page, so is there a way of splitting the data up like this?

 

Thanks,

Cal  8)

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.