SQL Fehler

03/05/2015 17:18 x"Kazuki#1
HaliHalo!

Bekomme bei der Code:


Diese Fehlermeldung;


Frage ist, woran es liegt & wie ich es behebe.


Mit freundlichen Grüßen
03/05/2015 17:29 .Shōgun#2
Your item_proto table has a different number of fields than your query
03/05/2015 17:39 rollback#3
du kannst vor values in klammern noch die spalten schreiben

insert into [table] ([column1], [column2], ...) values ([value to column1], ...);
03/05/2015 18:46 .Marcel'#4
Quote:
Originally Posted by [Sensenmann] View Post
du kannst vor values in klammern noch die spalten schreiben

insert into [table] ([column1], [column2], ...) values ([value to column1], ...);
Das hilft ihm aber nicht weiter. Sein Query und Tabelle unterscheiden sich nun mal das kann nicht gehen.
03/05/2015 19:03 .Shōgun#5
Post the definition of your item_proto table
03/05/2015 21:23 x"Kazuki#6
Meine item_proto hatte eine Spalte mehr.

Nun kommt aber das. SQL ist eig. ganz Simple,trotzdem habe ich mich noch nie mit geschäftigt. (Lernen in der Schule nur Access,ohne SQL):


Danke an alle & Juan:*


Mit freundlichen Grüßen
03/05/2015 21:45 infinty04#7
versuch mal das so

03/05/2015 22:36 .Shōgun#8
Quote:
Out of range value for column 'socket1' at row 1
This means that you are trying to insert a numeric value too big for the data type defined for this field (example, 3269454 on a TINYINT field).

[Only registered and activated users can see links. Click Here To Register...]

Solution - change the field data type to INT

Quote:
Data too long for column 'name' at row 1
This means you are inserting a string of text which is longer than the limit defined in the table definition for the 'name' field (which should be of type VARCHAR or CHAR).

Solution - Increase the SIZE of the field.