Hi All,
I'm working on a banner manager program and I seem to be having a problem
getting a true random number. It seems that some of the banners pop up more
frequently than others. Here is the code I am using. Is there something
better I could be using to generate a random number or is this as good as it
gets?
<cfquery datasource="#Attributes.DataSource#" name="q_banners">
SELECT BannerAdID
FROM BannerAds
WHERE Active = 1
</cfquery>
<cfset variables.bid = ListGetAt(ValueList(q_banners.BannerAdID),
andRange( 1, ListLen(ValueList(q_banners.BannerAdID))))>
TIA,
Duane Boudreau
CFExperts.Com
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.