php - Handling database table entries with backslashes? -


we're running weird edge case trying store json blob in table in our database, , blob needs able contain \ character. user enter in \test needs come that, instead coming tab followed "est"

as far can tell, whats happening when user enters , submits "\test" gets evaluated "\ \test" (remove space, cant put 2 backslashes in here , have display right?) client , entered table. can verify in sql gets called against table there 2 backslashes. when @ in table after step "\test". when client loads again gets evaluated tab followed "est".

we under impression second backslash necessary first backslash escaped , not evaluated maybe causing issues? sort of assume when query runs 1 of backslashes gets escaped anyway i'm not sure that. there out our database handling backslashes need looking out for? there way handle haven't considered?

it's postgres database if that's helpful. i'd i'm beginner intermediate on sort of thing, i'm looking through documentation if can point me in right direction helpful.

postgres version far can tell through amazon aws 9.3

edit think ive tracked issue down line in our php backend don't understand. i'm looking @ documentation , mark answered since i've verified not issue sql.

blockquote backslash - default - no special meaning in sql. might caused whatever code processing values (and sending them database). see here online example: rextester.com/qllyg57275 – a_horse_with_no_name

i'm accepting answer i've verified issue out backend code constructing sql, , not how sql being handled on database end.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -