I
I
invsm2015-10-13 19:14:01
MySQL
invsm, 2015-10-13 19:14:01

Why doesn't mysql skip french text?

The site is multilingual. Texts in any language except French are added to the database.
I get the error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'French string'..."
Encoding is utf8.
Comparison for utf8_unicode_ci table.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Puma Thailand, 2015-10-13
@invsm

Escape apostrophes and other special characters

R
Rsa97, 2015-10-13
@Rsa97

Does the string itself contain apostrophes by any chance?

S
sivabur, 2015-10-13
@sivabur

Use libraries that automatically screen everything for you. And more precisely, as far as I remember, there are unprepared requests where escaping is not necessary, since the data is transmitted separately.

D
dk-web, 2015-10-13
@dk-web

I'm most likely wrong, but... what version of php?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question