psatek
psatek

Reputation: 135

SQL escaping not working

I'm trying to insert some json into mysql

UPDATE `table` 
SET `value`= '["14\" Square"' 
WHERE `entity_id` = '1';

But when I select the value I get ["14" Square" instead of ["14\" Square" just wondering how to force the \ to not be escaped thanks.

Upvotes: 0

Views: 99

Answers (1)

haim770
haim770

Reputation: 49095

Just use double slash:

UPDATE `table` 
SET `value`= '["14\\" Square"' 
WHERE `entity_id` = '1';

Upvotes: 3

Related Questions