Answer the question
In order to leave comments, you need to log in
[PHP,SQL, update] How to properly update strings with special characters?
There is a line in the variable that contains the following expression:
...
dscr="Issued by" trg="0" req="0" mask="^[A-Yaa-yaёЁ/.\- 0-9,]{ 1,50}"
...
When I update this line to the database, I get in the database
...
dscr="Issued by" trg="0" req="0" mask="^[А-Ра-яёЁ/ .- 0-9,]{1,50}"
...
i.e. one slash in the regexp escapes.
the question is how to update correctly so that the data that was in the variable is written to the database exactly in the form in which it was in the variable?
Answer the question
In order to leave comments, you need to log in
pdo, placeholders, prepared statements and other scary words from the manual.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question