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
https://forums.phpfreaks.com/topic/268092-class-application-registers/
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)

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.