Click here to Skip to main content
15,888,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
AOA!
I am creating timetable. My question is that how do i create a how do i create a time slot for this .when one slot for the same teacher or class then we assign another slot and busy slot show a message that " slot is busy"
Posted
Comments
Dinesh.V.Kumar 17-Mar-14 7:19am    
Hi,
Before assigning the slot check if for the particular teacher has already been assigned to the slot or not. Write a select query
Select Count(ID) from <table> where Teacher_Id=<teacher_id> and slot_Id=<slot_id>
If the count is 1 or more, then show "Slot is busy" message if the count is 0 then assign the slot to the teacher using the update statement.

Hope this helps!!!

Regards
Aisha Ali khan 17-Mar-14 7:47am    
ok Thanks

1 solution

It is not that simple. Timetabling problems belong to the field of optimization which typically deals with multiple constraints and many possible solutions. I suggest you take the constraint programming approach. Read more:
1. Constraint programming approach for school timetabling[^]
2. Interactively solving school timetabling problems
using extensions of constraint programming
[^]
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900