Page 1 of 1

Getting back into scripting..Newbie question.

Posted: Thu Aug 14, 2003 10:34 pm
by Random
I was wondering how to get a value from the database/table..and then adding the new amount to it. I am setting up an online store, and would like to get my profit from before, and add in the new profit automatically, then print it on a site when I log on. I want to know how to call the profit beforehand..I can do the rest. Thanks.

Posted: Fri Aug 15, 2003 8:18 am
by twigletmac
Would an UPDATE statement be appropriate?

Code: Select all

UPDATE tablename SET field = field + whatever WHERE field_id = current_field_id
Mac