navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

update field

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> update field
Page: [1]
 
box

 

Posts: 125
Joined: 12/10/2002
Status: offline

 
update field - 1/22/2008 3:26:38   
Hi, I want to update a field "number" with a form! let me expalin, lets say the value of the field is 8, if I insert number 2 the new value should be number 6! not to 2 nor 10, is like inventory system. is like this:

New field value = current field value - form value.

fp_sQry="UPDATE DISTINCTROW mytable SET myfield_value =('::myfield_value::'- from_value) WHERE ID= ::ID::"

Any idea please.

< Message edited by box -- 1/22/2008 3:58:56 >
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: update field - 1/22/2008 14:19:50   
You should be able to do something like this :

fp_sQry="UPDATE mytable SET myfield_value=myfield_value - ::new_value:: WHERE ID= ::ID::"

Note - you dont use apostrophes for numeric fields

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to box)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> update field
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts