I am getting this error when inserting a query into the SQL tab of a database, it only adds 2 tables when it is supposed to add more, but the error is stopping it?


Query im inserting:

Software: MySQL
Software version: 5.1.68-cll - MySQL Community Server (GPL)

If you can help me out, I'd really appreciate, thanks!

Recommended Answers

All 5 Replies

The error seems to be right after you try to insert a null value, but the table structure seems to want not null


From what I can see there is something in the data in some of the inserts that is off or a special charcter . I tried to run your sql code and remove various rows from teh fe table and it would never load. If I removed the inserts for fe it continued on down till it got to news and did the same thing. It might be the text data type you are using. I suggest taking the sql dump and running only the create tables statements to get the tables created and then go back in and create your inital vales again and see what happens.

Thanks for the very detailed reply rch1231, I am no expert in SQL so I don't fully understand what to do, ill maybe get a mate or someone to do what you said, thanks.

I cant do it, could anyone please fix it up for me and send me the code, I am begging you, been trying to do this for over a week, please guys or girls.

Okay so I looked at the screenshot and code, and I saw something that caught my eye.

You said you are only creating 2 tables correct, so I went to your code and looked between where you created your 2nd and 3rd table.

Which is this:

/*!40000 ALTER TABLE `fe` DISABLE KEYS */;
INSERT INTO `fe` (`ID`, `userID`, `type`, `ip`, `note`) VALUES (1,12,'e','','Auspride018'),(2,13,'e','',''),(3,8,'f'​,'','Nely'),(4,8,'f','','Brittany'),(5,8,'f','98.94.78.​64','channa'),(6,8,'f','','Hector'),(7,8,'f','','Kim​mie'),(8,8,'f','','Karissa'),(9,8,'f','','Lilla');
/*!40000 ALTER TABLE `fe` ENABLE KEYS */;

Now let's take a look at those values shall we


Notice how entry 2 has an empty value for the 5th value? Now I am no expert on SQL, but I feel that empty value for the entry between Auspride018 and Nely might be the issue. Why not try inserting a value there, and running it. See if that works

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.