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 tips.recordCount) + 1>
<cfoutput>#tips.tip[tipNum]#</cfoutput>
Regards,
Matthew Walker
_____
From: Bailey, Neal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 18 May 2004 1:51 p.m.
To: CF-Talk
Subject: Daily Tip help...
Hello All...
I am having an issue with trying to build a rotating daily tips script. All
I want to do is have a database full of tips and everyday have a new tip
display on the front page. I thought it was easy but for some reason I
cannot get it to work. I have about 40 tips so all it needs to do is select
the next record everyday. Can someone point me in the right direction... I
have looked all over the net for examples but oddly enough there are not any
that do such a simple thing, at least that I could find.
Thanks for any help on this I'm sure its simple, but for some reason I cant
figure it out.
- Neal
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

