Randomly, you'd select top 3 and order by newid()

Sequentially, you could do it a few ways I'm sure. One way would be to
initially store all the IDs in a list or whatever in a session variable.
Each time the page is viewed, grab the first 3 IDs from the list, get those
records, then move those 3 IDs to the end of the list. So the next time the
3 IDs are grabbed, they are the next ones in line.

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: alex poyaoan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 8:22 AM
To: CF-Talk
Subject: problem with rotating news

Hi everybody 
I need help on how could i achieve rotating news.. I have 12 news items on
the database and i want it to rotate it showing only 3 items everytime i
refresh the page.. tried using top 3 but how could i rotate it.. 

thanks to all



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279447
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to