@OpenCart 1.5.5 I'm trying to export some rows from certain tables from source DB using this command, for example:
mysql_query("
SELECT `group`,`key`,`value`,`serialized`
INTO OUTFILE '".$outputDir ."/".$dbPrefix ."setting.csv' FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n' FROM `".$dbPrefix."setting`
WHERE `group` = 'banner' OR `group` = 'bestseller'
OR `group` = 'carousel' OR ` .....
")
After I delete these tables I try to import this file to the target DB using the following command:
mysql_query("
LOAD DATA INFILE '". $outputDir ."/". $dbPrefix ."setting.csv'
INTO TABLE `".$tDbPrefix."setting` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED
BY '\"' LINES TERMINATED BY '\n'
")
The problem is it generates dummy data with weird formatting; for example:
<li class="contact-2 cle"...
I use UTF-8 encoding and databases are identical.