<cfset randomize(datediff("d", "1-1-1990", now()))>
<cfoutput>daily random number: #rand()#</cfoutput>

<cfset randomize(datediff("w", "1-1-1990", now()))>
<cfoutput>weekly random number: #rand()#</cfoutput>

You'd then need to use this number to choose a row from your db. Is that
any help?

Regards, 
Matthew Walker 
http://www.matthewwalker.net.nz/




> -----Original Message-----
> From: Mark Smeets [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 10 October 2002 3:53 p.m.
> To: CF-Talk
> Subject: Daily/Weekly Quote Generator
> 
> 
> Hello everyone,
> 
> I'm trying to write a daily/weekly quote generator. I've got 
> the code that
> pulls a random quote from my database however I'm not sure 
> how to go about
> pulling it out every week or every day. (I'd like to be able 
> to interchange
> from a week to daily)
> 
> --------------------------------------
> Mark Smeets / stranger0 / ICQ: 1062196
> [EMAIL PROTECTED]
> http://www.prowerks.com/stranger
> 
> "Life is a series of small victories" - Gene Simmons
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
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

Reply via email to