Date maths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all. I am in the midst of creating a national online events directory (ie
evening classes, coffee mornings, yard sales etc). The user is able to enter
one-off events or regular events (daily, weekly, monthly) and each event
entered makes up one record in the events table in the db (mysql). People
are then able to enter a start and end date and the system will show all
events that meet their criteria (category, postcode within a certain
radius).

My problem is with repeating events. My thinking at the moment is to utilise
a calendar table, which contains event id as a foreign key and relevant
dates. All dates are held in the database as timestamps.

So, when an event-holder enters a repeating event, the main event details
are held in the events table, and all the relevant dates for the event (they
specify the first date of the event and the last date it is to be held) are
entered into the calendar table by increment (ie timestamp intervals by 24
hours, 7 days or monthly, and I know monthly is going to be tricky as it is
a fluctuating interval).

Has anyone out there had to deal with a similar problem, and if so do you
have any advice. This is going to take time so I will be patient and
continue, and welcome any suggestions. Many thanks and I can post code to
specific requests.

--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux