A couple of questions.
1. Is the query showing up in the debugging code?
2. Is the query cached anywhere else on the site?
3. Are you pulling a random record from the query, or does the query
change everytime?
Just an option, when we do randomized bannerads, we usually build an
APPLICATION scope array. The code looks something like this:
<!--- Initialize the array in the application.cfm --->
<cfif NOT IsDefined("APPLICATION.BannerArray")>
<cfquery name="getBanners" datasource="#APPLICATION.dsn#">
SELECT *
FROM Banners
</cfquery>
<cfset BannerArray = ArrayNew(1)>
<cfloop query="getBanners">
<cfset BannerArray[CurrentRow] = BannerPath>
</cfloop>
<cflock name="#APPLICATION.ApplicationName#" timeout="10">
<cfset APPLICATION.BannerArray= BannerArray>
<cfset APPLICATION.BannerNumber = getBanners.RecordCount>
</cflock>
</cfif>
<!---Display a random banner on any page --->
<cfoutput>
<img src="#APPLICATION.BannerArray[RandRange(1,APPLICATION.BannerNumber)]#">
</cfoutput>
Sharon
At 12:47 PM 5/3/2000 -0700, Doug Ford wrote:
>Katrina,
>
>The reason I say it's not running the query again is because of the same
>information
>that is being presented to me.
>
>I am using a query to grab and pull a web banner for my Home page.
>What I do is grab the top most banner from the list of banners,
>store the info in a variable, put that banner to the bottom of the list
>and then display the variable as the banner.
>
>So if I hit refresh, a new banner should appear. Since it doesn't
>always work, I am trying to figure it out.
>
>Thanks.
>
>Doug
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
>Sent: Wednesday, May 03, 2000 9:42 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Forcing a query refresh
>
>
>How do you know that it's not running the query again? What browser are
>you using. If you hold control while you click refresh that will force it
>to make the call back to your server for the latest information.
>
>--Katrina
>
>====================
>Katrina Chapman
>Consultant
>Ameriquest Mortgage
>
>
>
>
> dford@midrangecom
>
> puting.com (Doug To:
> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Ford) cc:
>
> Subject: Forcing a query
>refresh
> 05/03/00 09:33 AM
>
> Please respond to
>
> cf-talk
>
>
>
>
>
>
>
>
>Hi Folks,
>
>What's the best way of forcing a query to always
>run instead of it being cached?
>
>I am pulling a record from a DB and displaying it,
>but when I do a refresh/reload it doesn't
>run the query again.
>
>What's the best way of doing that?
>
>Thanks,
>
>Doug
>------------------------------------------------------------------------
>------
>
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>
>
>
>------------------------------------------------------------------------
>------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>---------------------------------------------------------------------------
---
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
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.