If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Database Structure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-08, 14:28
amcgibbon amcgibbon is offline
Registered User
 
Join Date: Dec 2008
Posts: 1
Database Structure

I have an existing database of events. I want to be able to query what events have availability in what months. Can anyone suggest the best structure for this in the database? Should it be one field for each month that can take a 1/0 and then we can query by month?

It's been a while since I worked in MySQL so any advice would be most appreciated.

Thanks,
Andy
Reply With Quote
  #2 (permalink)  
Old 12-17-08, 18:39
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Your events table should only have records for those dates with events on them.
You can then use a calendar table to find out for your reporting needs (e.g. finding what dates are booked and which are free, etc).
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On