• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

update

New Here ,
Apr 23, 2008 Apr 23, 2008

Copy link to clipboard

Copied

Hi.I have a form that updates all the fields.I have 2 fields:

Current Cost:<input type="text" name="productprice" value="#NumberFormat(product.product_price, "_.__")#" size="8">

Current Selling Price:<!---#price.product_price# ---><input type="text" name="productBasePrice" value="#NumberFormat(product.product_current_price, "_.__")#" size="8">

which they will be update correctly when we submit the form and the this procedure runs:
<CFSTOREDPROC procedure="sp_Update_Pricing2" dataSource="#session.eManager.datasource#"></CFSTOREDPROC>

now my problem is I want this query runs only if we change the value of those 2 fields.but this query runs whenever we push the submit button.
thanks for yr help.
TOPICS
Advanced techniques

Views

264

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 23, 2008 Apr 23, 2008

Copy link to clipboard

Copied

unless you want to check the values against the DB values first, and then run the procedure, my suggestion may be to have 4 fields:

The 2 fields you mention and then 2 hidden fields that contain the data from the DB - when you submit the form, compare the hidden fields with the visible fields and see if anything changed. If they changed, then run the procedure.

JMO

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2008 Apr 23, 2008

Copy link to clipboard

Copied

ok.thanks.I'll try it and let u know about the result.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2008 Apr 23, 2008

Copy link to clipboard

Copied

LATEST
works.thank u so much.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation