See below:
--Original Message-
> Hello Terry,
>
> Tuesday, March 9, 2004, 5:11:00 PM, you wrote:
>
> I know you have some solutions to the original problem already, but I
> just wanted to make one small observation:
>
> TR> The fields are to be CounterCode (Varchar 10), Count
See below:
--Original Message-
> If it was me writing the code, I'd use two different update statements:
>
> a) an UPDATE to initialize the DateTime to Now() and set the counter to
> 1
> when the page is first hit
> b) another UPDATE to increment the counter on all of the rema
Hello Terry,
Tuesday, March 9, 2004, 5:11:00 PM, you wrote:
I know you have some solutions to the original problem already, but I
just wanted to make one small observation:
TR> The fields are to be CounterCode (Varchar 10), CounterValue (Int 10) and
TR> CounterStartDateTime (DateTime).
Using a
Thanks, Jeremy
What I actually needed was:
UPDATE Table
SET CounterValue = CounterValue+1,
CounterStartDateTime =
IF(CounterStartDateTime IS NULL, Now(), CounterStartDateTime)
This prevents it going back to NULL if the value is already not NULL.
Thanks again.
Terry
--Original Messa
If it was me writing the code, I'd use two different update statements:
a) an UPDATE to initialize the DateTime to Now() and set the counter to 1
when the page is first hit
b) another UPDATE to increment the counter on all of the remaining hits
Something like this (assuming Java is your programmi