1) If PromoID is numeric, omit the single quotes.
2) Your select statement returns the value, so you can just add 1 to it; you
don't need to attempt to refer to it again with #Info.ClickThroughs#
UPDATE NetReferrers
SET ClickThroughs = (SELECT Info.ClickThroughs
FROM Info.NetReferrers
WHERE PromoID = #URL.Promo#) + 1
WHERE PromoID = #URL.Promo#
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 1:32 PM
To: CF-Talk
Subject: cf query?
<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???
Thanks,
Kevin
~~~~~~~~~~~~~~~~~
Kevin Mansel
Web Developer
Fox Communications
[EMAIL PROTECTED]
<<Kevin Mansel.vcf>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists