Help me

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
THE HONY
Forum Newbie
Posts: 7
Joined: Wed May 14, 2008 2:06 pm

Help me

Post by THE HONY »

How are you

I want to create table contains names for several students.

this table like the list of names with teacher.

-every student name row contains checkbox field called 'Attendance'.
-if student present then check the field ,otherwise uncheck.
-then i want to send students information to database.

This project like attendance in the class
please help me

Thanks for every body
<THE HONY>
User avatar
emmbec
Forum Contributor
Posts: 112
Joined: Thu Sep 21, 2006 12:19 pm
Location: Queretaro, Mexico

Re: Help me

Post by emmbec »

CREATE TABLE `students` (
`student_id` INT NOT NULL ,
`StudentName` VARCHAR( 250 ) NOT NULL ,
`teacherName` VARCHAR( 250 ) NOT NULL ,
`isInClassRoom` TINYINT( 1 ) NOT NULL
);

That is what you asked for, but if you want to keep the history of the student's attendance you will need more than ONE table, or use an attribute to store the date:

CREATE TABLE `students` (
`student_id` int(11) NOT NULL,
`StudentName` varchar(250) collate latin1_general_ci NOT NULL,
`teacherName` varchar(250) collate latin1_general_ci NOT NULL,
`isInClassRoom` tinyint(1) NOT NULL,
`dateOfAttendance` date NOT NULL
);

That way you can keep track of the days that they attended. It would also be wise to have a table for teachers, but I don't know if you want that...
THE HONY
Forum Newbie
Posts: 7
Joined: Wed May 14, 2008 2:06 pm

Re: Help me

Post by THE HONY »

Thank you my friend
<<<< emmbec >>>>>>

I want to give me more detials about tables .

how many tables

how i store attendance in database

Thank you again
Post Reply