0

I have one project setup locally, and n that, there is one table which has one column which is NOT NULL, so it can't be null.

Well, while I was testing, at the time of inserting data from PHP it throws an error as in that column can not be null.

The same setup is done on the actual server, where the error is not thrown and it gets inserted successfully.

I am not knowing why this is happening, is there any MySQL level setting to be done as in to allow null values though the structure says doesn't allow, which I missed.

Thanks,

Sharad Soni

Sharad Soni
  • 378
  • 1
  • 5
  • 18

1 Answers1

0

There is no "ignore NOT NULL" setting in MySQL - if you have a NULL value in a column, that column is not set to be NOT NULL. Double-check the table schema on the server.

Adrian
  • 42,911
  • 6
  • 107
  • 99
  • Actually, I have exported the SQL and imported to my local server, and yes I have double checked it. They are same. – Sharad Soni May 17 '17 at 17:41