mysql - How to insert a string with ' and " in sql table -


i want insert string both ' , " database. know how handle one, when both present, can use escape characters?

depending on database software (mysql? oracle?)

in mysql, escape single quote backslash:

\' 

in oracle use double quote:

''  

(this 2 single quotes).

there no need escape ".

also added bonus, should not doing this. use @ least "parametrized queries" or orm (object relation mapping) framework.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -