Hi,
I'm building a stock-contol application and am stuck on something. Stock items need to be removed for repairs and then replaced when repaired. So someone enters the number to be removed and then enters them back in after repairs have been made.
My problem is that if someone accidently adds back a greater number than they removed, the field displays a negative integer - which is wrong. What is the best way to get the system to check if the submitted figure will make the field less than zero and stop them from doing this? Can this be done with php or should it be done at mysql level?
Thanks