0

Hi,

I changed my table to InnoDB so one table can be used as foreign key. To do that i had to DELETE the content in my child table. I exported and saved the data on my computer.
1, Now that im trying to import all the data with phpMyAdmin it gives me this error msg.

#1136 - Column count doesn't match value count at row.

2, When i try to insert from a html form it gives me error msg:
"cant insert data because the server unexpectedly dropped the connection."

3, and if i try to insert info through the insert function on PhpMyAdmin i get this error;
#1452 - Cannot add or update a child row: a foreign key constraint fails

Why do i get all this problems. What can be done???

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by rch1231
0

Try removing the foreign key, import the data and then re-create the foreign key and you should be fine. Most of the export/imports scripts I have seen import all of the data first then create the keys at the very end.

0

Try removing the foreign key, import the data and then re-create the foreign key and you should be fine. Most of the export/imports scripts I have seen import all of the data first then create the keys at the very end.

Hi, ive removed the foreign key but still no luck. i can now insert within phpMyadmin but not from a html form or import. This is very annoying. wonder why my table is messed up.

0

Log onto the server and look at the MySQL and httpd logs they will tell you why the import and/or web page is not working correctly.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.