|
yorcadon Beginner
Joined: 11 Jun 2009 Posts: 16
|
Posted: Mon Aug 02, 2010 6:19 pm
Subtracting from all database values |
I'm using 3.22. This used to work fine but after updating a few new beta releases at once it has a problem.
I need to subtract 1 from all values in a database.
Code: |
#LOOPDB @Database {Database.%key=%val-1} |
This still seems to work unless the database key contains more than one word.
So in a database where
blah1 = 10
test1 test2 = 10
the above code changes it to
blah1 = 9
test1 test2 = 10
test1 = 9
So its only taking the first word from the key.
I am looking for a way to fix this, any suggestions?
Thanks. |
|
|
|
yorcadon Beginner
Joined: 11 Jun 2009 Posts: 16
|
Posted: Mon Aug 02, 2010 6:54 pm |
So I found an alternative that seems to work fine.
Code: |
#LOOPDB @Database {#ADDKEY Database %key (%val-1)} |
That seems to do the trick. Not sure why I didn't just do that before. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 03, 2010 4:39 pm |
Please post all BETA issues in the BETA forum. The issue with multi-word keys is a known bug already posted in the beta forum.
|
|
|
|
|
|