> Why do you to check first? Just do an update:
'cause I'm thick ;) Didn't even think of the "just update it stupid" thing.
Forest got in the way of the trees.
Thanks,
Paul
> -----Original Message-----
> From: stas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 28, 2000 4:44 PM
> To: CF-Talk
> Subject: Re: One step method to check then increment a value in db?
>
>
> Why do you to check first? Just do an update:
>
> <cftransaction>
> <CFQUERY NAME="updatecount" DATASOURCE="#dsn#">
> UPDATE pagecount
> SET pagecount = pagecount + 1
> where pageid = #thispage#
> </CFQUERY>
> </cftransaction>
>
> ----- Original Message -----
> From: "Paul Sinclair" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, December 28, 2000 4:21 PM
> Subject: RE: One step method to check then increment a value in db?
>
>
> > Scott,
> >
> > Can't go at it this way. It's more complicated than a simple hit counter
> but
> > that seemed like the simplest way to clarify what I needed.
> It's actually
> a
> > specialized ad banner app that I am working on right now. It needs to
> count
> > each ad impression and clickthru and increment the count whenever a
> > particular ad is served or clicked. Could involve thousands of ads on
> > thousands of pages so I am trying to figure out the simplest method of
> doing
> > the check + increment in one step.
> >
> > Thanks for any ideas.
>
>
>
>
~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~
Get Your Own Dedicated Win2K Server! Instant Activation for $99/month w/Free
Setup from SoloServer PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support
Visit SoloServer, https://secure.irides.com/clientsetup.cfm.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists