V
V
Vladislav2020-05-17 20:21:36
PHP
Vladislav, 2020-05-17 20:21:36

How to remove escaping when exporting from mysql to csv?

I export data from mysql to csv using the command

SELECT `somefields1`, `somefields2`.... INTO OUTFILE '.....csv' FIELDS TERMINATED BY ';'  ENCLOSED BY '"' ESCAPED BY '\\' LINES STARTING BY ''  TERMINATED BY '\r\n'  FROM `tmp_username_1589735165` WHERE `numbertask`='somenumber'


I send it from php script.

The problem is that in csv the characters that were escaped in mysql are also escaped.

Can you please tell me how to solve this moment and get the final csv report without escaped characters (without slashes)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-05-17
@FanatPHP

Do not escape characters in mysql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question