Aug-02-2022, 01:12 PM
(This post was last modified: Aug-04-2022, 09:00 PM by deanhystad.)
I think it is a bad idea to verify actual values returned from a database query. Maybe 0 can be, or worse is a valid sell price. The future maintainer of your code will be confused that database queries for free items always fail and they will curse you when they find the reason is buried deep in some method.
Verify values before you put them in the database. Verify that a query found a match. Assume values returned by the query are correct.
Verify values before you put them in the database. Verify that a query found a match. Assume values returned by the query are correct.