Jump to content

school attendance


xionhack

Recommended Posts

Hello. I have a quick question. I am making a school database and I want to do an attendance form. I am a little bit confused of what is the best approach. Right now i did this.

 

One table (member) with member_id and student_name. One "attendance" table with attendance_id, attendance_date, student_id, type_attendace. Type_attendance means a code to differentiate if the person is late or on time.

 

Then in the php i will have a type of grid, that gives me in the left all the names of the student, and then to the right a box where i write the code. Is that the best approach to do this? thanks!

Link to comment
Share on other sites

The database is fine, I guess. Not sure about the user interface. What do you mean a "box where i write the code"? If you're going to make a user interface, you shouldn't have to write code. That's the whole point of a user interface.

 

But of course, this is all just speculation. You should create it that best fit the description or whatever the school wants it to be.

Link to comment
Share on other sites

Why not set the attendence to TINYINT to be false or true, But false default? A list of students (populated from database) and checkmarks can be easily generated, each chechbox can be an array (IE: attended[])

Link to comment
Share on other sites

TINYINT may work. The problem is that there can be many types. Unexcused absence, excused absence, tardy, on-time, etc.

 

Ah. Maybe a similar field to go along with it. If you have attendances per say, As TINYINT then you can get their total attendence without any thing special. Reasons can simply become another field as an index of reasons, As that type as signed will allow up to 128 types of reasons.

Link to comment
Share on other sites

Just use a VARCHAR field setup your HTML like:

 

<input type="checkbox" name="attend[$id]" value="unexcused absence">
<input type="checkbox" name="attend[$id]" value="excused absence">
<input type="checkbox" name="attend[$id]" value="tardy">
<input type="checkbox" name="attend[$id]" value="on-time">

Link to comment
Share on other sites

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.