> <cfquery datasource="blah" username="user" password="pass"
> name="addclickthrough">
>               UPDATE NetReferrers
>               SET ClickThroughs = (SELECT Info.ClickThroughs
>                                       FROM Info.NetReferrers
>                                       WHERE PromoID = '#URL.Promo#')
>               #Info.ClickThroughs# + 1
>               WHERE PromoID = '#URL.Promo#'
>       </cfquery>
> 
> 
> Am i doing this right, or am i just not thinking correctly 
> today???

This doesn't look quite right.

If you want to take the appropriate value of ClickThroughs from the Info
table and increment it by one, you won't reference Info.ClickThroughs as a
CF variable within the query. Since it looks like you're referring to a
single table, NetReferrers, you should be able to do this:

UPDATE  NetReferrers
SET             ClickThroughs = ClickThroughs + 1
WHERE           PromoID = '#URL.Promo#'

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to