----- Original Message -----
From: "Kennerly, Rick H CIV" <[EMAIL PROTECTED]>
> 5 separate "ads" that run for a week each and rotate each Monday morning.
I
> need to run ad 1 for a week, then ad 2 for a week, ....ad 5 for a week,
and
> then recycle to ad 1 for a week again.  These are actually meal menus that
> progress forward a week with each cycle.
----------------------------

On a site I've just done, I rotate stuff like this:

- Is application.stuff.timestamp undefined or older than a week (or however
long)?
- If yes, grab stuff that's not been used (indicated with Boolean 'used'
field).
- If nothing returned, clear all 'used' flags and try again.
- Query this query to get one item randomly.
- Flag it as used.
- Store info about the item in application.stuff (structure).
- Set application.stuff.timestamp to Now().

This should be a pretty flexible system.

HTH,

Gyrus
[EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
PGP key available

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to