load data infile, dealing with fields with comma
How do we deal with field with comma when using load data infile? i have this query: $sql = "LOAD DATA LOCAL INFILE '{$file}' INTO TABLE sales_per_pgs FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES (@user_id, @account_code, @pg_code, @sales_value) SET user_id = @user_id, account_code = @account_code, product_group_code = @pg_code, sales_value = REPLACE(@sales_value, ',', ''), company_id = {$company_id}, year = {$year}, month = {$month}"; and a line from the csv looks like this: 139, pg89898, op89890, 1,000,000.00 where 1,000,000.00 is a sales value. Currently, what is