I posted an approach to solving the problem, I did not post a code
solution.  Here what I had to say in a previous post:

Have a table with the fields, ItemID, AdBeginDate, AdEndDate, ItemDetail,
AdDate (if needed)

Then just write a query to check what todays date is and what Ad/item
should be displayed depending on where todays date falls within the
AdBeginDate and AdEndDate.  Just be sure to that add dates do not overlap.
This way you can map out however many ads you want into the future and
potentially you could have a user admin screen where they can change their
ad whenever they want and for however long they want.  If it so happens
more than one ad will run in a week you will just have to change your logic
a little. This might not be the best approach if you know your only going
to have 5 items no more no less and for 1 week periods infinitely, however,
the approach I offer allows for flexibility and can put the ad maintenance
in the users hands.

CC


                                                                                       
                                                
                      "Kennerly, Rick                                                  
                                                
                      H  CIV"                  To:      CF-Talk 
<[EMAIL PROTECTED]>                                            
                      <RHKennerly              cc:                                     
                                                
                      @rroads.med.navy         Subject: 5 week rotation                
                                                
                      .mil>                                                            
                                                
                                                                                       
                                                
                      01/08/03 08:43                                                   
                                                
                      AM                                                               
                                                
                      Please respond                                                   
                                                
                      to cf-talk                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                




Seems like someone did this sometime in the recent past, but I couldn't
find
it in the archives.

I have 5 fixed-text items in a database that need to rotate display on a
weekly basis, rotating weekly on Monday (week one: item one; week two, item
two).  Obviously the purpose of having 5 items is so that the same piece is
not displayed on the same week of the month every month (they rotate
forward
one week each month). It's not an ad, it's a lunch menu.  I can't work out
an query that will work.

Any elegant query ideas?  Okay, any ideas at all?

Rick


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to