Tried Isaac's and it doesnt count any of the views.

<CFQUERY DATASOURCE="#Green#" NAME="getCachedAds" 
cachedwithin="#CreateTimeSpan(1,0,0,0)#">
    SELECT * 
    from dbo.banner_left

</CFQUERY>

<!--- RandRange is Random integer between first number and second(1st,2nd) --->
<CFSET ADID = getCachedAds.ADID[RandRange(1,getCachedAds.recordcount)]>


<!--- Calls up all columns in table --->
<CFQUERY dbtype="query" NAME="GetADs">
   SELECT *
  FROM getCachedAds
  WHERE ADID = #ADID#
  ORDER BY ADID


</CFQUERY>
<!--- incrementvalue Adds one to an integer, so it adds one to views--->
<CFSET add = incrementvalue(val(GetADs.views))>
<CFQUERY datasource="#Green#" name="AddView">
  UPDATE dbo.banner_left
  SET views = #add#
  WHERE ADID = #ADID#
</CFQUERY>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316441
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