A
A
Alexey Chertok2017-01-26 11:32:38
PHP
Alexey Chertok, 2017-01-26 11:32:38

How to fix apostrophe error in SQL?

Hello.
Guys, I've run into a problem. When there is a request to the database with the " ' " character, the request is simply not sent.
Those. with a regular apostrophe, " ` " is sent, but with a single quote, it doesn't. I ran into this problem when I switched from Apache to Nginx.
UPD: by request I mean, for example, adding news, where there is a single quote in the title.
What could be the problem and how can it be solved?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DrunkMaster, 2017-01-26
@DrunkMaster

Escape the quote like this: \' or bind parameters in PDO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question