Re: Importing and exporting from MySQL, escape slash problem

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

 



It's possible that there is an .htaccess file in phpMyAdmin that has
Magic Quotes on that is messing you up...

Other than that, it's specific to phpMyAdmin, so maybe ask those guys
what they did...

On Sat, March 1, 2008 7:38 pm, Dave M G wrote:
> 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.
>
> 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?
>
> Thanks for any advice.
>
> --
> Dave M G
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux