But still save empty as 0 not NULL
I guess I can live with that but this is not correct to me
I'm still not able to save empty date manually in phpmyadmin
and not able to save it as 0000-00-00 too I've got invalid date format
it request a valid date format when empty or 0!
This is important because those fields can be save as empty and this will required the validation to be changed let say I want to check if the field is empty now I have to check if equal 0 or not.
innodb_version
5.7.11
protocol_version
10
slave_type_conversions
tls_version
TLSv1,TLSv1.1
version
5.7.11
version_comment
MySQL Community Server (GPL)
version_compile_machine
x86_64
version_compile_os
Win64
Julian Hansen
Was this the bit that came out for sql_mode?
NO_AUTO_CREATE_USER
I have 5.6 but will install 5.7 and try to replicate.
lenamtl
ASKER
Yes
the default values was
sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"
and I kept only NO_AUTO_CREATE_USER
after I have read some info on the web
I just tested on 32 bit version and previous PHPmyAdmin 5.6.17
and same problem occurred.
INT only save INT 0 , no NULL, no empty, Warning: #1366 Incorrect integer value
for date I got an error if date is empty Warning: #1265 Data truncated for column
Both are set to NULL
Julian Hansen
I am trying to find out if in either / both of these situations you are dealing with the default (out of the box) install or was some configuration change made after installation.
I am using x86_64 5.6.20 - and I do not have the problems you are having. My sql_mode is empty when I query it as per the above instructions.
To move forward we need to be comparing apples with apples. If I want to replicate your installation I am still in the dark as to how to do that as you have not answered my questions with respect to default setup.
Having been through that I am confused - your table structure is specifically configured with all fields being NOT NULL - how are those fields ever supposed to get a NULL value?
lenamtl
ASKER
No the fields of my table fields are really set to NULL.
After a lot of Google search (Mysql strict mode problem)
I have found a lot of people having the same problem and their solution was to set MySQL
Which I have done with no luck, it was still not allow NULL values from PHPMyADMIN.
Then I have completely shut down my PC and restart and now it is working...
What have realized is when you restart the services this won't end the PHPMyADMIN session...
So I guess this was the culprit.
Still trying to understand how you manage to insert NULL into a field that was created NOT NULL - but glad it is working.
lenamtl
ASKER
Don't worry the field is set to NULL ;)
lenamtl
ASKER
sql-mode="" need to be empty
I have found that the PC need to be restarted to take the new PHPMyADMIN mysql configuration value.
Only restart the service was not enough.
You can read more in the 5.7 FAQ here https://dev.mysql.com/doc/refman/5.7/en/faqs-sql-modes.html