Jump to content

[SOLVED] Viewing data based on attribute value ?


halm1985

Recommended Posts

Again the students grades project ..

 

The scores table has an attribute named "APPROVED" which data type is boolean (true/false)

 

Can someone give me an idea on how to make grades data viewable ONLY IF the value on this column is set to TRUE

 

Another question ? what is the datatype in MySQL equivalent to (true/false) in Access ( note : i'm using PHPMyAdmin ) and how true and false values are represented ?

This solves part of the problem but not all ..

 

Maybe i should explain in more details ..

 

Each student has a number of records in the scores table for (score for each subject ) .. two columns are there : one for MID-Term Score, and the second is for Final Score ... Mid-term scores are viewable without approval .. however, Final Scores are not . again the two values are in one row ..

 

Now the scenario should be as follows :

 

A student logs to his page ... a table is there that contains the scores for each subject, MID-TERM Scores are viewable once their are filled into the Database .. However, FINAL SCORES are not viewable ( even if they exist ) unless the column ( Approved ) value is set to true ..

 

How to do that in PHP ?

 

Attached is a sample of the data structure

 

[attachment deleted by admin]

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.