Jump to content

Script works only on first row of query result


Recommended Posts

This code is excerpted from a larger form for editing values saved in the database. It was written by someone else who is no longer available and I am stymied by its behavior. The conditions are: artPrice can be any integer; the query returns more than one row and all three “allow" functions return true. As indicated, artPrice = 0 means not for sale; artPrice = 1 means price on request and all other values represent dollar values.

For the first row returned, expected behavior occurs. A price can be changed in value or  changed to POR or NFS; POR can be changed to NFS and vice versa and either one can be changed to a dollar value.

For all rows other than the first, a dollar price can be changed to a different value or it can be changed to POR or NFS. POR can be changed to NFS and vice versa. The problem is that POR or NFS, whether set from the database or by a change from a dollar value, cannot be reset to a dollar value.

It took me a few hours just to figure out the parameters of the problem and lots more to decide I couldn’t solve it.



Edited by farse
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...