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
Post a Comment