How to correct syntax error when inserting into a table?
"Insert Into " . $tableName . " (location_address) Values ('$location_address')"
In this code, when the value of the variable has French characters, such as '
, give an error, I cannot fix it.
Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Université, Quebec City, QC, Canada')' at line 1, query was: Insert Into addresses_store_location (location_address) Values ('Université Laval, Pavillon Alphonse-Desjardins, Rue de l'Université, Quebec City, QC, Canada')
Who can help me? thanks