The RandRang works for starting number, but I need to display all the
banners. If there are 6 records in the table and the startrow is 6 it
only displays the one banner. I want it to start at 6 and then go back
to 1 and display the rest.

-----Original Message-----
From: David Schmidt [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 2:10 PM
To: CF-Talk
Subject: RE: Output Question

You are correct, Steve.  I would randomize the seed generator though.  I
usually use:

<cfset junk = randomize(gettickcount()/1000))>

BTW, the "divide by 1000" is just to keep the seed an integer.

David



-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 2:03 PM
To: CF-Talk
Subject: RE: Output Question


You could do something like this

<cfquery name="qryName" .....>
SELECT *
FROM banners
</cfquery>

<cfset bannerrow = RandRange(1, qryName.recordcount)>

<cfoutput query="qryName" maxrows="1" startrow="#bannerrow#">
Banner stuff....
</cfoutput>

______________________
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Double Down [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 4:55 PM
To: CF-Talk
Subject: Output Question


I am pulling records from a DB that display banners. I want to display
all of the banners, however I would like to rotate their display
position so the first record pulled is not always the first one
displayed.  Any ideas?

DDINC





______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to