The operative word in my post was LIKE.

Personally I would  use a stored procedure and use the DBMS native
transaction locking.  Or, alternately, to have a "raw" download 
recording
table that has a record inserted for every download attempt.  No
CFTRANSACTION needed for that.  I would then use another set of 
queries to
feed the necessary metrics.  The advantage to a raw table is I can get
metrics on downloads per date, day, time of day, etc.

Russel


> -----Original Message-----
> From: Thomas Chiverton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 8:38 AM
> To: CF-Talk
> Subject: RE: sending a file directly
>
>
> > <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

Reply via email to