Yes, sort of. The query is checking to see if the store is open, so you will need to define dates in such a way as to say the store will be open starting 1/1/2006 and will close on 1/27/2006. So in the query the only way it will return a record is if today's date is somewhere between 1/1/2006 and 1/27/2006. =]
On 10/25/05, Roberto Perez <[EMAIL PROTECTED]> wrote: > > At 05:50 PM 10/25/2005, Alan Rother wrote: > >I wouldn't use cfschedule for this. > > It sounds like what you are asking for is akin to store hours. In other > >words, between 1/1/2006 and 2/28/2006 you want the "store" to be open > >between the hours of 9am and 5pm. > > > Yes, in a scenario where the "store" should be open 24 hours a day between > 1/1/2006 at midnight and 2/28/2006 at midnight (instead of a 9am-5pm > schedule). > > > >And you want it to be possible that you > >can have appropriate users set these date ranges in some sort of admin > area. > >Is this correct? > > > Yes, and this second part is done already (database fields and web > interface to update those fields) > > > > > If so, what you need to do is simply run a check against this data, so > that > >if right now is not within one of these date ranges you cannot access the > >area. > > > Oh, I see what you are saying. Right now I'm checking against a "closed" > or > "open" status. Instead, I could just check against a "later that" or > "earlier than" a certain date and time, right? > > > > <cfquery name="MyQueryName" datasource="MyDSN"> > >SELECT * > >FROM MyTable > >WHERE DateStart <= #CreateODBCDateTime(Now())# AND DateEnd >= > >#CreateODBCDateTime(Now())# > ></cfquery> > > If your recordcount is 0, then the "Store" is closed and you should deny > >access to the protected area. > > > I'm assuming that, if recordcount is 0, it means that the opening date has > not passed or that the closing date has passed, is that correct? > > Thanks in advance, > > > Roberto Perez > [EMAIL PROTECTED] > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222272 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

