Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Mysql »

Eror Syntax

Estas en el tema de Eror Syntax en el foro de Mysql en Foros del Web. Bueno, tengo este sql Código: INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`, `can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, ...
  #1 (permalink)  
Antiguo 13/11/2011, 12:37
 
Fecha de Ingreso: enero-2011
Mensajes: 73
Antigüedad: 13 años, 3 meses
Puntos: 1
Eror Syntax

Bueno, tengo este sql

Código:
INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`, `can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `is_arrow`) VALUES
(1000304, 'gm_tttrftablec', 'gm_tttrftablec', 's', 1, 1, 1, '0', '0', '0', 1000304, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
(1000305, 'gm_tt2rftablec', 'gm_tt2rftablec', 's', 1, 1, 1, '0', '0', '0', 1000305, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
(30000140, 'Stonesy_bar1', 'Stonesy_bar1', 's', 1, 1, 1, '0', '0', '0', 30000140, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
(30000141, 'Stonesy_bar2', 'Stonesy_bar2', 's', 1, 1, 1, '0', '0', '0', 30000141, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
(1000110, 'gm_statueoonno', 'gm_statueoonno', 's', 1, 1, 1, '0', '0', '0', 1000110, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
(10000053, 'gm_joshuaaiono', 'gm_joshuaaiono', 's', 1, 1, 1, '0', '0', '0', 10000053, '1', '1', '1', '1', '1', 'default', 1, '0', '0');
Y el phpmyadmin me devuelve este error

Código:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '30000140, '1', '1', '1', '1', '1', 'default', 1, '0', '0'), (30000141, 'Stonesy' at line 4
La verdad no se que puede ser :S ayudenme
  #2 (permalink)  
Antiguo 13/11/2011, 13:53
Avatar de gnzsoloyo
Moderador criollo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Actualmente en Buenos Aires (el enemigo ancestral)
Mensajes: 23.324
Antigüedad: 16 años, 5 meses
Puntos: 2658
Respuesta: Eror Syntax

Parece que tenías un caracter de control o algún tipo de caracter extendido metido en un valor numérico.
Es probable que haya sido algo accidental, o es producto del origen de datos.

Te sugiero que uses el MYSQL Workbench para hacer pruebas porque tiene un corrector sintactico que te puede mostrar bien estas cosas.
Código MySQL:
Ver original
  1. INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`, `can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `is_arrow`)
  2.     (1000304, 'gm_tttrftablec', 'gm_tttrftablec', 's', 1, 1, 1, '0', '0', '0', 1000304, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
  3.     (1000305, 'gm_tt2rftablec', 'gm_tt2rftablec', 's', 1, 1, 1, '0', '0', '0', 1000305, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
  4.     (30000140, 'Stonesy_bar1', 'Stonesy_bar1', 's', 1, 1, 1, '0', '0', '0', 30000140, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
  5.     (30000141, 'Stonesy_bar2', 'Stonesy_bar2', 's', 1, 1, 1, '0', '0', '0', 30000141, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
  6.     (1000110, 'gm_statueoonno', 'gm_statueoonno', 's', 1, 1, 1, '0', '0', '0', 1000110, '1', '1', '1', '1', '1', 'default', 1, '0', '0'),
  7.     (10000053, 'gm_joshuaaiono', 'gm_joshuaaiono', 's', 1, 1, 1, '0', '0', '0', 10000053, '1', '1', '1', '1', '1', 'default', 1, '0', '0');
__________________
¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...
"El problema es la interfase silla-teclado." (Gillermo Luque)

Etiquetas: php, sql, syntax
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:04.