In the last episode (Mar 29), David yahoo said:
> I know that function in php, but I generate sql from a sql queries in order
> to export some data
> from on database to another.
>
> I make something like that :
>
> select concat('INSERT INTO links VALUES(NULL,"99","',link.about,'","',
> ....
> from
> links,
> ...
>
> this queries gives me sql insert command.
There is no native mysql ESCAPE() or UNESCAPE() function. It would be
nice to have, though :)
A workaround would be SELECT ...
REPLACE(REPLACE(REPLACE(link.about,'\\','\\\\')'"','\\"'),"'","\\'")
, which will escape all quotes and backslashes in link.about.
--
Dan Nelson
[EMAIL PROTECTED]
( table, query )
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php