Open chipscompany opened 6 years ago
I ran into the same issue. I used the line: $getData = str_replace("'","''",$getData); in functions.php. This replaces sinlge quotes with two single quotes which fixes the MySQL error and will keep the single quote in your data. I also added an additional getData statement to skip the first line so I don't have to remove headers.
Hi, I use your script to import csv and it work great. Thanks. But it doesn't import the line that containing single quote (I didn't test with double quote). I tryed to change
fgetcsv
function and addPDO::quote()
ormysqli::real_escape_string()
but it's doesn't work.