Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: darkleen on December 04, 2011, 04:04:34 am

Title: HeidiSQL error
Post by: darkleen on December 04, 2011, 04:04:34 am
i was trying to make a item import to HeidiSQL but it give this error SQL Error (1054): unknown column ,name2, in fleld list, can any help me out here plz
Title: Re: HeidiSQL error
Post by: schlumpf on December 04, 2011, 11:56:51 am
well, there is no column named "name2" then.
Title: Re: HeidiSQL error
Post by: Solarion on December 04, 2011, 03:00:27 pm
Lemme guess. You used wow-v and either your core is not supported by it  or your server is on Cataclysm, am I correct?
Title: Re: HeidiSQL error
Post by: darkleen on December 05, 2011, 12:03:37 am
no my server is a worth 3,5.5a
Title: Re: HeidiSQL error
Post by: Morfium on December 08, 2011, 11:37:05 pm
Usually your statement is something like:

INSERT INTO tablename (column1,column2) VALUES(value1,value2);

It seems the column name2 which is in your insert statement tries to add a column name2 which is not present in your db.
You could try to delete the column and corresponding value from your insert statement.

If it's like:
INSERT INTO items (name, name2, guid,...) VALUES ('Uber Staff', 'Ubersuperroxx0rstaff',334,...)

you might want to try it by removing name2 and 'Ubersuperroxx0rstaff'.
But tbh. If your insert statement has such differences compared to your database you might have gotten it for the wrong database structure or version.
E.g. if you have a trinity core a mangos db item might have a similar structure but if they differ you'd have to manually change each insert statement, which could, depending on your item count, get rather annoying.
Title: Re: HeidiSQL error
Post by: Steff on December 10, 2011, 12:38:55 am
Or just get data that fits to your table structure :)
Title: Re: HeidiSQL error
Post by: Felix11 on December 13, 2011, 11:36:59 am
The SQL dump you are importing has "43534" as some number in in a column which has a primary or unique key. That's why you get "Duplicate entry".

You need to edit your SQL dump, change this "43534" to some other number. Unfortunately this can create inconsistencies in your database if other tables are referring to this particular id, so my proposal is only the last solution. It would be better if you get a nicer SQL dump.