KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to decrement a value when user delete it in php and mysql. I want to check not to go below than 0. If value is 0 then do not decrement . mysql_query("UPDATE table SET field = field - 1 WHERE id = $number"); If field is 0 then do not do anything
Tags (comma-separated)
Save Edits
Cancel