A php page processes the data submitted by the user. The processing of the field name is to determine whether the isset exists, and then use the thinkphp verification rule require to determine whether it is empty. A name field in mysql is not set to null, but is there a blank string record in the table? What are the causes of this problem? A php page processes the data submitted by the user. The processing of the field name is to determine whether the isset exists, and then use the thinkphp verification rule require to determine whether it is empty.
A name field in mysql is not set to null, but is there a blank string record in the table?
What are the causes of this problem?
Reply content:
A php page processes the data submitted by the user. The processing of the field name is to determine whether the isset exists, and then use the thinkphp verification rule require to determine whether it is empty.
A name field in mysql is not set to null, but is there a blank string record in the table?
What are the causes of this problem?
In mysql, null and null strings are different.
If the field value is left blank in mysql, the default value is null.
Your name field is set to not null, so you must have a value before it can be inserted successfully, but this value can be a null string.
Check your code, cool.
You can print out the SQL statement you inserted into the database.
Whether the correct value has been obtained
Whether the field name is consistent with the mysql column name