sticheno
05-11-2009, 06:35 AM
I'm looking to add a capture of "todays events" from my forum calendar to my site home page. I'm able to query the sql for one-off events no problem, but I don't quite understand how the other fields are used to cope with recurring events.
Something like this shows event id & title for the single day events
select eventid, title,
date_format(from_unixtime(dateline_from + 86400),"%c-%d-%Y") as start,
dateline_to as to_days,
IF (dateline_to = 0, 1, 0) as singleday
from event
WHERE to_days(from_unixtime(dateline_from)) = (to_days(curdate()) -1)
order by eventid desc
Please could someone point me in the right direction for understanding the data format and how recurring events are tracked?
Something like this shows event id & title for the single day events
select eventid, title,
date_format(from_unixtime(dateline_from + 86400),"%c-%d-%Y") as start,
dateline_to as to_days,
IF (dateline_to = 0, 1, 0) as singleday
from event
WHERE to_days(from_unixtime(dateline_from)) = (to_days(curdate()) -1)
order by eventid desc
Please could someone point me in the right direction for understanding the data format and how recurring events are tracked?