Posted by Brian on 02/16/07 16:12
> Hi there
>
> I'm sure this can be done but not sure of the MSQL code
>
> I want to run an update statement on a field where it adds
> X to want ever is already in the field?
>
> e.g.
> field = 10
> Add = 5
> update field add 5 to field so field now = 15
> but if field was null then field now = 5
>
> Brian
>
> UPDATE table SET field = IFNULL(field,0) + 5
WOW, that's easier than I thought, thanks Captain Paralytic
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 2355 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
Navigation:
[Reply to this message]
|