Results 1 to 5 of 5

Thread: Timetable in MySQL

  1. #1
    Join Date
    Mar 2010
    Posts
    162

    Timetable in MySQL

    Hello,
    I want to make a timetable for a new project in mysql database. Can I store timetable in mysql database? If yes then how can I do this? The main point here is the logic which is to be applied. So, if you guys have any idea of doing it or you have done it before then please let me know. Thanks in advance.

  2. #2
    Join Date
    Nov 2009
    Posts
    583

    Re: Timetable in MySQL

    Hello,
    I would recommend you to use Date/Time field, use the column datatype here and use a Start/End time. In the free period table you can even add the class ID column as well if you need, that is, this may be optional choice.
    You can even use the following query
    Code:
    "SELECT `starttm` WHERE `usrid`=num AND `clid`=num2"
    Just try the above query and see if this works for you. if it does not then please post the error which you are getting.

  3. #3
    Join Date
    Dec 2009
    Posts
    292

    Re: Timetable in MySQL

    Hello,
    Even I am trying something similar to this, if you can recommend me something then it would be great. The above posted would not work, because if you do want to use half an hour in the timetable then it will not be possible by using the following. That is the 30mins slot or the period is really hard to manage here, this may even miss some of the records in the table.

  4. #4
    Join Date
    Nov 2009
    Posts
    347

    Re: Timetable in MySQL

    Hello,
    I think the real problem here is the timetable does not match the time period exactly what you are trying to expect. So, if you want a solution for this then you will need to re-define the table so that it can manage the longer or rather initial hour when it first starts. The change here it the time difference, that is who you are going to manage the time differences here. To prepare a algorithm for this will be hard. Hope this information will help you.

  5. #5
    Join Date
    Nov 2009
    Posts
    333

    Re: Timetable in MySQL

    Hello,
    If I am not wrong then you do not need the 12hours shifts, I guess I am correct here. If this is your case the it is pretty easy as you can write a function which will subtract the time period. I think if you even try to store the start or the end times as the number of seconds. By doing this the subtraction would be easy, I think this is the best option here.

Similar Threads

  1. Replies: 4
    Last Post: 13-01-2011, 01:08 AM
  2. Hsc & Ssc Oct Examination Timetable
    By farooque khan in forum Education Career and Job Discussions
    Replies: 2
    Last Post: 17-09-2010, 08:08 AM
  3. Nata Examination Timetable
    By farooque khan in forum Education Career and Job Discussions
    Replies: 1
    Last Post: 16-08-2010, 10:19 AM
  4. Replies: 3
    Last Post: 07-11-2009, 09:36 PM
  5. S.E. Engineering Examination Timetable - SEM III
    By Cool_Rahul in forum Education Career and Job Discussions
    Replies: 2
    Last Post: 05-12-2008, 12:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,547,646.50846 seconds with 16 queries