:[EMAIL PROTECTED] [EMAIL PROTECTED]
_
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, May 17, 2004 8:52 PM
To: CF-Talk
Subject: RE: Daily Tip help...
or, actually...
cfquery name=set_new datasource=myDSN
UPDATE tips
SET active_tip = 1
WHERE tip_id = #randRange(1-100) --if you have
_
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 18 May 2004 12:52 PM
To: CF-Talk
Subject: RE: Daily Tip help...
or, actually...
cfquery name=set_new datasource=myDSN
UPDATE tips
SET active_tip = 1
WHERE tip_id = #randRange(1-100) --if you have 100, or whatever
your total is
/cfquery
why not put them in a database, with asort order, and whatever day of
the month it is, show that based on the sort order numbered from 1-28 or
something like that? or just do it randomly.where each page refresh
would show a new one?
tony
Tony Weeg
sr. web applications architect
navtrak, inc.
Since there are only 40, it's no big deal to get the whole lot from the
database and get CF to choose. Int(now()) converts today into an integer.
You can use mod to turn that daily number into a recurring cycle..
cfquery name=tips
SELECT.
/cfquery
cfset tipNum = (int(now()) mod
: Daily Tip help...
why not put them in a database, with asort order, and whatever day of
the month it is, show that based on the sort order numbered from 1-28 or
something like that? or just do it randomly.where each page refresh
would show a new one?
tony
Tony Weeg
sr. web applications
Subject: RE: Daily Tip help...
How about flag the tip record with a bit field called 'live'. Then you can
see the tip that's live, and then take the next tip in whatever order you
have them.
Greg
-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, May 17, 2004
]
Sent: Monday, May 17, 2004 10:41 PM
To: CF-Talk
Subject: RE: Daily Tip help...
Well this is kind of what I am trying to do...
I want to automate it though so that all I have to do is keep adding
tips and the system will just continue to rotate through them either
randomly or in order either
PROTECTED]
Sent: Monday, May 17, 2004 10:41 PM
To: CF-Talk
Subject: RE: Daily Tip help...
Well this is kind of what I am trying to do...
I want to automate it though so that all I have to do is keep adding
tips and the system will just continue to rotate through them either
randomly or in order
8 matches
Mail list logo