Happy new year, all! I've created a MySQL-based event calendar for a private school. It looks like this: http://www.wilkinsonschool.com/wilkCalendar.php
Most of the events in the calendar are all-day affairs, but some occur at specified times. So I have two separate fields in the event table, one for the DATE (required) of the event and one (optional) for the TIME of the event. For events that span multiple days, I have them enter the event once per day, but could automate that sometime. ANYWAY, here's my question: When I am displaying a calendar, for each date in the month displayed, I search the event table for events on that date. BUT, I was not able to use an = in the where clause, I guess because a date in MySQL always has the hours, minutes, and seconds attached. I played around with trying to change the $dateToCheck so it had hours, minutes, and seconds attached, but somehow never could get it right. I ended up with a query like this: SELECT * FROM $thisTable where START_DATE >= '$dateToCheck' AND START_DATE < '$dateAfterToCheck' Is there a more elegant way for me to accomplish this? -- Emily Emily Berk http://www.armadillosoft.com
