MySQL Forums
Forum List  »  PHP

MySQL is auto escaping all commands
Posted by: Marion Fauber
Date: April 14, 2018 07:57AM

I just changed my web hosting site. I uploaded several web pages that use PHP & MySQL. Almost everything worked right off the bat. I did find that any SQL cmd I submitted that contained a quoted string did not come back with results. I then used phpMyadmin with the following cmd:

SELECT * FROM table WHERE name='anyname';

The cmd failed with a syntax error. Looking further I found that all of the single quotes were automatically escaped ( I tried using double quotes with the same result). MySQL actually escaped ( with \ ) the quotes and also escaped the \ several times. Thus resulting in a syntax error.

I have used MySQL on my personal development computer and also on other web hosting sites and have never seen MySQL behave this way...

Any thoughts on what I can do to eliminate this "Feature".

Options: ReplyQuote


Subject
Written By
Posted
MySQL is auto escaping all commands
April 14, 2018 07:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.