Re: Removing slashes from the database

From: Date: Wed, 03 Jun 2015 02:58:29 +0000
Subject: Re: Removing slashes from the database
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-49031@lists.php.net to get a copy of this message
On Tue, Jun 2, 2015 at 10:50 PM, Ron Piggott <ron.piggott@actsministries.org > wrote: > > I am working through the process of removing \'s from the database. I am > trying to get this query using a variable starting with "<<<" > > $query1 =<<<EOF > UPDATE TABLE_NAME SET > COLUMN_NAME = > REPLACE(REPLACE(REPLACE(COLUMN_NAMEňè*2Ê™Ž| > GE…q#,'\\\'','\''),'\\\"','"'),'\\\\','\\'); > EOF; > > But when I go to execute the query I am getting the error: > > |#1064 - You have an error in your SQL syntax; check the manual that > corresponds to your MariaDB server version for the right syntax to use near > > '\''),'\\"','"'),'\\','\')' at > line 1 | > > Could someone help me know what \ and ' should be part of this query so it > will execute correctly --- only removing \'s from the database table text > columns? > > Thank you. > > Ron > When you say remove, as replace all occurrences with an empty string, or replace with a different character?

« previous php.db (#49031) next »