Re: Removing slashes from the database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 02/06/15 22:58, Aziz Saleh wrote:

On Tue, Jun 2, 2015 at 10:50 PM, Ron Piggott <ron.piggott@xxxxxxxxxxxxxxxxxx <mailto:ron.piggott@xxxxxxxxxxxxxxxxxx>> 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

    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.


When you say remove, as replace all occurrences with an empty string, or replace with a different character?
I want \" to become just "
I want \' to become just '
I also want however \ was escaped to become just \

(I am trying to revert the text back to what it was originally before mysql_escape_string was applied)

I hope this helps elaborate.


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux