Jump to content


Photo

Making a MySQL-based Calendar System


  • Please log in to reply
4 replies to this topic

#1 jlange

jlange
  • Members
  • PipPip
  • Member
  • 25 posts
  • Locationracine wi

Posted 01 August 2006 - 02:50 PM

Here's the rundown: I'm making a checkout system for my school for signing out iBook carts and computer labs, etc.

I'm trying to figure out how to implement the calendar into a MySQL table. I need to have
A) A daily calendar for each thing (eg, Cart A Cart B Cart C Lab A)
B) Nine spots for information on the object, one for each period of the day.

I've been racking my brain on how to do this, and I've come up blank. It just seems to me that the database structure doesn't go deep enough for the levels of information I'm trying to display.

I'm using PHP and MySQL on Apache, generic installation on Mac OS X. Any help would be appreciated
I see a room. There are some walls. And some ceilings. WAIT. Just one ceiling.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 02:40 PM

Well, any calendering application needs to have time slots, and then a way to assign items to these blocks.  I'm not sure what you mean by "deep" enough.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 jlange

jlange
  • Members
  • PipPip
  • Member
  • 25 posts
  • Locationracine wi

Posted 02 August 2006 - 04:41 PM

I'm relatively new to MySQL and the whole database-style of thinking..but I need a database that would contain the calendar, then a table for each day, then a cell for each hour, and another thing inside of that for each object (iBook cart, LCD Projector, etc) that is changeable from php on whether it is already signed out or not.
I see a room. There are some walls. And some ceilings. WAIT. Just one ceiling.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 04:57 PM

Try not to think of the DB design in terms of the output, but rather in terms of the smallest pieces of information that you need to store.  That is, while you might have a cell for each hour, you won't have a record for each hour, because a) nothing may be scheduled and b) it may span 2.5 hours.  Does that make sense?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 jlange

jlange
  • Members
  • PipPip
  • Member
  • 25 posts
  • Locationracine wi

Posted 02 August 2006 - 07:17 PM

Actually, it only has to be 9 class periods out of the day, this is a school environment.
I'm currently using a folder heirarchy using PHP includes and stuff. It works fine, but I would like to migrate to MySQL at one point or another.

Thanks for all the input, fenway
I see a room. There are some walls. And some ceilings. WAIT. Just one ceiling.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users