The form has two database inputs of type int. If the data is submitted directly to the database, it will be 0 instead of empty.
The default value of the database is empty, not 0. But the effect I want is empty. How to solve it? Please give me some guidance. Thank you very much
The form has two database inputs of type int. If the data is submitted directly to the database, it will be 0 instead of empty.
The default value of the database is empty, not 0. But the effect I want is empty. How to solve it? Please give me some guidance. Thank you very much
Use empty to detect whether the variable is empty, and then reassign the '' character. When inserted into the database, it will be empty.
java
is so clearly divided, the front end is all strings. You can try rewriting the set
method of the corresponding field of bean
The default value of this field in the database is set to 0. If no default value is given, it will be null