OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Importing and exporting from MySQL, escape slash problem

From: Sebastian Mendel (listssebastianmendel.de)
Date: Wed Mar 05 2008 - 02:34:57 CST


Dave M G schrieb:
> PHP List, MySQL List
>
> In my PHP environment, I have "Magic Quotes" turned off, and I use the
> mysql_real_escape_string() function clean strings of SQL syntax before
> inserting them into my database.
>
> So the data stored in my database does not have escape characters in it.
> Particularly, double and single quotes don't have slashes in front of them.
>
> This seems to work fine so long as I'm reading data into and out of the
> database from within my scripts.
>
> However, when I backup and import databases - I use the phpMyAdmin
> interface - they have escape slashes in front of every double and single
> quote characters. I'm not sure if it's on the export or import where
> they get added in.

what version of phpMyAdmin?

> I've looked through the phpMyAdmin online documentation, and I can't see
> any option to control the presence of escape slashes. It seems to me
> that if it adds them in when exporting, it should take them out when
> importing. Or vice versa, but in either case be consistent.
>
> I just want my database to be exactly as it is before any export or
> import options.
>
> I'm a little muddled as to where I'm making the mistake. Can anyone
> advice on the best practice for preserving my database as is when
> backing up and restoring?

this 'bug' is unknown to me, did you tried to reproduce on phpMyAdmin demo
servers?

http://pma.cihar.com/

http://wiki.cihar.com/pma/Getting_Help

--
Sebastian

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql