Ir para conteúdo
  • Cadastre-se

Erro ao adicionar SQL ao Navicat


jcxxesc

Posts recomendados

Se aparecer esse erro ao adicionar uma sql no Navicat,

é muito fácil resolver!!!

 

Vejam a descrição do erro abaixo:

 

[Err] 1136 - Column count doesn't match value count at row 1

[Err] INSERT INTO `armor` VALUES ('9310', 'Dynasty Helmet - Heavy',

'head', 'true', 'none', '550', 'bone', 's', '0', '-1', '83', '0', '0', '5370000', '268',

'true', 'true', 'true', 'true', '0', '0');

[Msg] Finished - Unsuccessfully

 

 

Veja um exemplo de uma SQL da armadura Dynasty que está causando este erro.

 

INSERT INTO `armor` VALUES ('9310', 'Dynasty Helmet - Heavy', 'head', 'true', 'none', '550', 'none', 's', '0', '-1', '83', '0', '0', '5370000', '268', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9311', 'Dynasty Breastplate - Heavy', 'chest', 'true', 'heavy', '7620', 'scale_of_dragon', 's', '0', '-1', '205', '0', '0', '14300000', '715', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9312', 'Dynasty Gaiters - Heavy', 'legs', 'true', 'heavy', '3260', 'scale_of_dragon', 's', '0', '-1', '128', '0', '0', '8960000', '448', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9313', 'Dynasty Gauntlets - Heavy', 'gloves', 'true', 'none', '540', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9314', 'Dynasty Boots - Heavy', 'feet', 'true', 'none', '1110', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9315', 'Dynasty Helmet - Light', 'head', 'true', 'none', '550', 'bone', 's', '0', '-1', '83', '0', '0', '5370000', '268', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9316', 'Dynasty Leather Armor - Light', 'chest', 'true', 'heavy', '7620', 'scale_of_dragon', 's', '0', '-1', '205', '0', '0', '14300000', '715', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9317', 'Dynasty Leggings - Light', 'legs', 'true', 'heavy', '3260', 'scale_of_dragon', 's', '0', '-1', '128', '0', '0', '8960000', '448', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9318', 'Dynasty Gloves - Light', 'gloves', 'true', 'none', '540', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9319', 'Dynasty Boots - Light', 'feet', 'true', 'none', '1110', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9320', 'Dynasty Helmet - Robe', 'head', 'true', 'none', '550', 'bone', 's', '0', '-1', '83', '0', '0', '5370000', '268', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9321', 'Dynasty Robe Armor - Robe', 'chest', 'true', 'heavy', '7620', 'scale_of_dragon', 's', '0', '-1', '205', '0', '0', '14300000', '715', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9322', 'Dynasty Stockings - Robe', 'legs', 'true', 'heavy', '3260', 'scale_of_dragon', 's', '0', '-1', '128', '0', '0', '8960000', '448', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9323', 'Dynasty Gauntlets - Robe', 'gloves', 'true', 'none', '540', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

INSERT INTO `armor` VALUES ('9324', 'Dynasty Boots - Robe', 'feet', 'true', 'none', '1110', 'leather', 's', '0', '-1', '55', '0', '0', '3580000', '179', 'true', 'true', 'true', 'true', '0', '0');

 

- Se vocês abrirem o Navicat, e depois uma coluna como "armor" por exemplo,

irão observar que há >>> 20 colunas, da coluna item_id até item_skill_lvl.

 

Só que nessa SQL existem 21 colunas, :P este é o erro!

Abaixo está a primeira linha como exemplo, e as colunas estão em vermelho e negrito para facilitar a visualização.

 

INSERT INTO `armor` VALUES ('9310', 'Dynasty Helmet - Heavy', 'head', 'true', 'none', '550', 'none', 's', '0', '-1', '83', '0', '0', '5370000', '268', 'true', 'true', 'true', 'true', '0', '0');

 

> [Err] 1136 - Column count doesn't match value count at row 1

 

Traduzindo para o português:

 

[Err] 1136 - Contagem de colunas não confere com a contagemde valores na linha1 (TODAS as linhas da SQL estão erradas igualmente)

 

Observem que nessa linha, por exemplo, entre a coluna 6 ('550',) e 8 ('s',) existe um: 'none',

(nem sei por que ta alí aushuah)

 

Essa coluna NONE simplesmente não existe.

Já na linha 2 há um 'scale_of_dragon', em vez de 'none',

 

Sendo assim, excluam essas colunas da SQL:

 

(ERRADO)

INSERT INTO `armor` VALUES ('9310', 'Dynasty Helmet - Heavy', 'head', 'true', 'none', '550', 'none', 's', '0',...

INSERT INTO `armor` VALUES ('9311', 'Dynasty Breastplate - Heavy', 'chest', 'true', 'heavy', '7620', 'scale_of_dragon', 's', [...]

 

(CORRETO)

INSERT INTO `armor` VALUES ('9310', 'Dynasty Helmet - Heavy', 'head', 'true', 'none', '550', 's', '0',...

INSERT INTO `armor` VALUES ('9311', 'Dynasty Breastplate - Heavy', 'chest', 'true', 'heavy', '7620', 's', [...]

 

Portanto, se der algum erro desses, comparem a SQL que vc baixou com a tabela existente no Navicat.

Existe um tutorial sobre como fazer isso então olhem. ;)

 

[Tutorial]-Adaptar SQL ( Detalhado )

 

http://www.l2jbrasil...__fromsearch__1

Editado por jcxxesc
Link para o comentário
Compartilhar em outros sites


retire as colunas materiais que ficao antes da grade que e "s"

por ex: na segunda coluna ta assimm:

'scale_of_dragon', 's'

deleta o : scale_of_dragon

vai fica assim ' ', 's'

ai tu executa dinovo

é ver no que da :D

 

obs: tem que fazer isso cm todas as colunas se não num da :D

Editado por InsanO666

Dia: 27/09 AS: 18:00 NÃO PERCA.

WWW.L2DUSK.COM

EnwCgkt.gif

Link para o comentário
Compartilhar em outros sites

//edit

Dei vacilo confundi mals. Depois que li entendi mais que parecia uma duvida parecia kkkkkkkkkkkkkkkk. Mais ta bem explicado

Editado por ♦Mr. Flips♦

L2JBrasil, o melhor Forum L2Java do MUNDO!

Minhas metas aqui no Fórum

contribuidor.png

Link para o comentário
Compartilhar em outros sites

  • 8 years later...

dei dump SQL e na tabela custom armor e criei uma sql cm base na anterior apenas mudei os ids  e mesmo assim estou cm esse erro, , numeros de coluna esta correto, ams navicat aprensenta essa sms poderia ajudar?


[Err] 1136 - Column count doesn't match value count at row 1
[Err] INSERT INTO `custom_armor` VALUES ('10019', '10019', 'Goddess Hair B', 'hair', 'face', 'false', 'none', '0', 'wood', 'none', '0', '-1', '-1', '0', '0', '0', '0', '0', 'false', 'true', 'true', 'true', ';');
[Msg] Finished - Unsuccessfully

OBS: Rev L2JDream

Link para o comentário
Compartilhar em outros sites





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.