PHP Classes

multiple events

Recommend this page to a friend!

      Active Calendar  >  All threads  >  multiple events  >  (Un) Subscribe thread alerts  
Subject:multiple events
Summary:Help getting range of events to display
Messages:1
Author:cc
Date:2007-03-24 00:31:50
 

  1. multiple events   Reply   Report abuse  
Picture of cc cc - 2007-03-24 00:31:50
I am having a problem with getting the calendar to show multiple events linked from mysql. Right now I can only get one set of events to post at a time ( example May 1 to 15 or May 16 to 15 will post, but not both).
I have tried several versions of the active calendar but can not get this to work with either the mysqlevents version or the other versions like y_3p. The application I am using the calendar for is a reservations calendar. The only thing it needs to do is show the booked dates as a different color from the available dates in the year view.

My calendar table is:
cal_id (int)
start_date (date)
end_date (date)
property_id (int)
res_no (int)

To get the range of dates I am using the following;


"SELECT dayofmonth(cal.start_date) as sday, month(cal.start_date) as smonth, year(cal.start_date) as syear, dayofmonth(cal.end_date) as eday, month(cal.end_date) as emonth, year(cal.end_date) as eyear, cal.property_id, property.property_id FROM cal, property WHERE cal.property_id=property.property_id AND property.property_id=%s order by res_no ";

for($x=$sday;$x<=$eday;$x++)
$cal->setEvent($syear,$smonth,$x);


Any help would be greatly appreciated.