additions and Subtraction
Posted: Mon Sep 09, 2002 6:22 am
Hi All,
I need to do the following in PostgreSQL
1) Get a number from a user
2) Add or substract the number to an existing number in the database
For instance:
A user enters 10 to a form..
and in my database I have 15 of which I need to substract from the user number
how do I write the select?
I've tried:
Select value - $user_value as new_value from Table
So how do I update the table? - so that my new valuew will show?
I need to do the following in PostgreSQL
1) Get a number from a user
2) Add or substract the number to an existing number in the database
For instance:
A user enters 10 to a form..
and in my database I have 15 of which I need to substract from the user number
how do I write the select?
I've tried:
Select value - $user_value as new_value from Table
So how do I update the table? - so that my new valuew will show?