Page 1 of 1

Help me

Posted: Wed May 14, 2008 2:20 pm
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>

Re: Help me

Posted: Wed May 14, 2008 2:55 pm
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...

Re: Help me

Posted: Fri May 16, 2008 9:26 am
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