Foreach? Add 10 to current value.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    Foreach? Add 10 to current value.

    I have a product table. If i want to increase the prices of the items by say $10. what's the syntax for that? How do I get the current value of the field in the current row.

    Better explained:

    UPDATE table SET price = price + 10?

    Thanks,


    Dan
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    LMAO!!

    What I wrote WAS the right syntax.

    But I tried it after I posted this. Sorry.

    Wow...that doesn't happen everyday.

    Didn't think it would be that simple. i was going into Stored Procedures and temp tables while it was under my nose the whole time.

    Thanks....I guess.

    ^_^

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      * giggles *

      Comment

      Working...