farse Posted June 29, 2019 Share Posted June 29, 2019 (edited) 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. Anybody? price_edit.php Edited June 29, 2019 by farse typo Link to comment Share on other sites More sharing options...
justsomeguy Posted July 1, 2019 Share Posted July 1, 2019 It sounds like one of your functions isn't working right, but you didn't show the code for those functions. It's best to just copy and paste your code into a code block here in the forum. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now