> <cfquery name="GetCounter"...
> SELECT HitCount
> From...
> </cfquery>
> <cfset Counter = GetCounter.HitCount + 1>
> <cfquery name="UpdateCounter"...
> UPDATE ...
> </cfquery>
You really need to make things like that a transaction (cftransaction).
Think what happens if your current value was 2, and two ppl came at once,
read 2 from the database, and both write 4 back... you've missed a hit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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