Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

values is undefined #26

Closed
lbottoni opened this issue Jan 6, 2018 · 3 comments
Closed

values is undefined #26

lbottoni opened this issue Jan 6, 2018 · 3 comments

Comments

@lbottoni
Copy link

lbottoni commented Jan 6, 2018

DROP TABLE IF EXISTS shops;
CREATE TABLE shops (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
city varchar(50) DEFAULT NULL,
address varchar(50) DEFAULT NULL,
postalcode varchar(50) DEFAULT NULL,
province varchar(100) DEFAULT NULL,
province2 varchar(2) DEFAULT NULL,
region varchar(100) DEFAULT NULL,
nation_id smallint(5) unsigned NOT NULL,
logitude varchar(100) DEFAULT NULL,
latitude varchar(100) DEFAULT NULL,
idremote int(11) DEFAULT NULL,
urlremote varchar(255) DEFAULT NULL,
jsondataremote varchar(255) DEFAULT NULL,
typemarket varchar(255) DEFAULT '' COMMENT 'catena di appartenenza',
groupmarket varchar(255) DEFAULT NULL,
logo varchar(255) DEFAULT NULL,
phone varchar(255) DEFAULT NULL,
PRIMARY KEY (id,nation_id),
UNIQUE KEY idremote_groupmarket (idremote,groupmarket),
KEY shop_nation (nation_id),
KEY id (id)
) ENGINE=InnoDB AUTO_INCREMENT=2065 DEFAULT CHARSET=utf8;


-- Records of shops


INSERT INTO shops VALUES ('1', 'Carrefour Market', 'BUSTO ARSIZIO', 'Via Duca D\'Aosta, 19', '21052', null, 'VA', 'Lombardia', '109', '8.854601', '45.616616', '1913817', '/punti-vendita/supermercato-carrefour-market-busto-arsizio-duca-daosta-19', null, 'Carrefour Market', 'carrefour', null, null);

try this!

TypeError: values[k] is undefined
@lbottoni
Copy link
Author

lbottoni commented Jan 6, 2018

\' in Via Duca D \' Aosta, 19

' with or without not work inside a string
i have tried with 1 slah, two, three...nothing, i have always the same error

if i remove the \' from string you have another issue with PRIMARY KEY (id,nation_id), , if i remove nation_id and \' from string work fine

@martindrapeau
Copy link
Collaborator

Bug confirmed. Need to investigate further. I saved the use case at this URL:
http://www.csvjson.com/sql2json/66ce0b33daa6ea09893962199e60e8f9

@martindrapeau
Copy link
Collaborator

Bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants