V
V
Vanes Ri_Lax2016-04-08 13:57:37
MySQL
Vanes Ri_Lax, 2016-04-08 13:57:37

How to escape special characters in a string before inserting into a query?

Hello,
I wrote a parser that saves data to the database. But it happens that special characters come, how can they be screened?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evhen, 2016-04-08
@EugeneP2

You probably form an insert query by concatenating a string?
Use PreparedStatement

A
Arris, 2016-04-08
@Arris

Google: PDO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question