Welcome! Log In Create A New Profile

Advanced

Single Quote problem in MySQL

Posted by YogiYang 
Single Quote problem in MySQL
June 03, 2021 07:08AM
Hello,

I have run into a problem recently.

My application is storing user entered data to DB and everything is working fine.

When user enters a single quote the insert query is giving errors or storing wrong or partial data.

How to solve this?

TIA

--
Yogi Yang
pao
Re: Single Quote problem in MySQL
June 03, 2021 12:29PM
Are you using hexecutesqlquery to insert the data?

Regards

Paulo Oliveira
Christoph Erdmann
Re: Single Quote problem in MySQL
June 03, 2021 03:11PM
Hallo Yogi,
replace the single quote before with \' (Backslach / Single Quote)
Re: Single Quote problem in MySQL
June 04, 2021 07:27AM
Hello,

Thanks.

This worked. Using \' solved my problems.

--
Yogi Yang
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: