I have two phpmyadmin both are version 4.2.7 and PHP version is PHP Version 5.4.24 one of phpmyadmin is allowing null values and another not accepting the null values
Phpmyadmin - 1
INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
Phpmyadmin - 2
In the second table, I didn't give the values for column3 its error like
I got the error:
General error: 1364 Field 'column3' doesn't have a default value.
Even though i didn't set the null for phpmyadmin-1 but its working fine. How can I solve this ? Any suggestion ?
INSERT INTO table_name (column1,column2,...)
VALUES (value1,value2,...);
Check your code is like this
when you create the database you should apply this option as well.
And in your code assign Your value3=NULL.
Then add the above function as same.
INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
With Default value
ALTER TABLE table_name
MODIFY column3 datatype DEFAULT default_value;
With allowing nullable
ALTER TABLE table_name
MODIFY column3 datatype NULL;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With