I am trying to import a CSV file containing single quotation marks into the text. And each time, MySQL gives me an error. How could I avoid this type of error?
Here is one of the texts that causes problem:
Sam Capra, agent de la CIA basé à Londres, échappe à l'explosion de son bureau grâce à un appel de sa femme Lucy. Mais cette dernière, enceinte, disparaît et Sam est tenu responsable de l'attentat par la CIA.
and here is my SQL query:
$sqlInsert = "INSERT into products_details (`product_title`,`product_price`, `product_image`, `product_gallery`,`product_description`, `meta_value`, `stock`, `weight`, `active`)
values ('" . $column[2] . "','" . $column[21] . "','uploads/" . $column[0] . ".jpg','" . $column[1] . "','" . $column[22] . "','" . $json . "','" . (int)$column[15] . "','" . $column[20] . "','" . (int)$column[23] . "')";
Thank you in advance for your help!