do you store the event's end month or full date or duration in the db, too? what are the fields? how about events that start in one year and end in the next???
post your db table structure (with data types and explanations of what data is stored in the filed if not clear from filed name). Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ alex poyaoan wrote: > HI everybody > > Got this situation that i need to display events depending on the month > selection "form.month" it works fine when the event duration is within the > month but i also need to display the duration enddate would be going over the > following month or more... below is my code... > > <cfquery name="GetEvents" datasource="sql1"> > SELECT * > FROM GetEvents > WHERE StartYear = #form.YearChosen# AND EventMonthStart = #form.MonthChosen# > ORDER By StartDate > </cfquery> > > <cfoutput query="GetEvents"> > #startdate# - #enddate# - #description# > </cfquery> > > result would be: this taking into consideration that the selection > form.yearchosen = 2008 and > form.monthchosen = january which has a value of 1 > > 01/01/2008 - 01/10/2008 - meeting 1 > 01/05/2008 - 02/10/2008 - conference > 01/20/2008 - 03/10/2008 - class > > the problem arises when the selection would be: > if form.yearchosen = 2008 > form.monthchosen = february value 2 > > the second record and the third record would still appear on the result which > is still ongoing in february. > > 01/05/2008 - 02/10/2008 - conference > 01/20/2008 - 03/10/2008 - class > etc. > > couldn't figure out how to deal with it. > > thanks > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315261 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

