Would a cftransaction be sufficient here, if you have the ability to
maybe a stored procedure would be better. If not swap a cflock around
the block of code should to the trick as well.


-----Original Message-----
From: Phillip Broussard [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 20 February 2002 7:03 AM
To: CF-Talk
Subject: Best way to do this query

Sorry to ask but I have a dead brain right now. (I hate it when I feel
dumb.)

X¿x
~~~
  
I need to check the database to see if a record is there. 
If it's there then increment it by one, otherwise add the record. 
If two people hit it at the right time I may get two records. What 
should I
do to prevent this? 
This is what the code would look like.


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to