Ah yes that will be because there is another variable somewhere in the request with the name ADID and it was using that instead of the one coming from your query.
Thats why you should always scope your variables, unless there is a specific reason not to. If you scope them, the function isnt left to make up its own mind whether it'll use request.ADID, URL.ADID, form.ADID, application.ADID, session.ADID, client.ADID or variables.ADID or another ADID that might have strayed into the request somewhere. As you've discovered, debugging errors like that are really hard, because there's no error message thrown and its quite possible you might not even recognise that there IS an error for some time. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Wed, Dec 10, 2008 at 4:31 AM, Sin Tec <[EMAIL PROTECTED]> wrote: > It was pulling in the wrong ADID when showing an image... I had to put > #GetAds.ADID# in the Where instead of just #ADID#. > > <!--- incrementvalue Adds one to an integer, so it adds one to views---> > <CFSET add = incrementvalue(val(GetADs.views))> > <CFQUERY datasource="Brooke" name="AddView"> > UPDATE dbo.banner_left > SET views = #add# > WHERE ADID = #GetAds.ADID# > </CFQUERY> > > > It seems to be working now. Thank you so much for all your help. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:316498 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4