mysql insert problem escape string and apostrophe

Frcc78bis

Client
Регистрация
06.07.2017
Сообщения
49
Благодарностей
2
Баллы
8


Код:
I'm very hungry !
Hello,

I want to insert some data into a mysql database. Connection is working. When there is some apostrophe like in the exemple (code) above, there is a problem. I want to do the same as mysql_real_escape_string in php I guess. --> so the apostrophe in the text doesn't stop the sql request.

I tried "string escape" in Text processing but it's not working.

I found something in the forum but it was in Russian (I can't make sens of it even with google traduction) and it was from some years ago.

Can someone help me please ?

I'm sure the solution is easy, I must have missing something.

Thanks
 

esouldy

Client
Регистрация
28.02.2016
Сообщения
185
Благодарностей
92
Баллы
28
You may to use prepared statements. Like this
 

Вложения

  • Спасибо
Реакции: Frcc78bis

Frcc78bis

Client
Регистрация
06.07.2017
Сообщения
49
Благодарностей
2
Баллы
8
Thanks a lot it's working. The insert is working but I have an error message on the zennoposter log

Код:
Executing action Dbof  Error working with database
 

esouldy

Client
Регистрация
28.02.2016
Сообщения
185
Благодарностей
92
Баллы
28
INSERT request are "without responce", a problem may here. Or check a connection string. Parameters like "Allow user variables" or related can to help.
 

Frcc78bis

Client
Регистрация
06.07.2017
Сообщения
49
Благодарностей
2
Баллы
8
Ok. I'll try tomorrow. Thanks again.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)