> Hello Terry,
>
> Tuesday, March 9, 2004, 6:25:00 PM, you wrote:
>
> TR> Good point, Richard. I was perhaps in a little bit too much of a
> > hurry
> TR> putting that together, and didn't even consider that!
>
> No worries. One other thought that occurred to me that might help with
> the o
Hello Terry,
Tuesday, March 9, 2004, 6:25:00 PM, you wrote:
TR> Good point, Richard. I was perhaps in a little bit too much of a hurry
TR> putting that together, and didn't even consider that!
No worries. One other thought that occurred to me that might help with
the original problem is as follo
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
an be fairly certain that the record exists (or can code around it if
it doesn't), so I'll probably stick with what I've got.
Thanks anyway!
Terry
>
> ----- Original Message -
> From: "Terry Riley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
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
cuted.
...
etc.
Just my two cents worth
Rhino
- Original Message -
From: "Terry Riley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 12:11 PM
Subject: Update field conditionally
> Using v4.0.15 on WinNT under Apache.
>
> For
> UPDATE Table SET CounterValue = CounterValue+1, CounterStartDateTime =
> (IF CounterStartDateTime IS NULL, Now())
>
> without success.
It looks like you just have the syntax wrong. Try:
UPDATE Table SET CounterValue = CounterValue+1, CounterStartDateTime =
IF(CounterStartDateTime IS NULL, N
Using v4.0.15 on WinNT under Apache.
For my sins, the client has insisted on creating a page counter!
The fields are to be CounterCode (Varchar 10), CounterValue (Int 10) and
CounterStartDateTime (DateTime).
Setting up the table is no problem. However, client wants to have the
CounterStartDat