Reputation: 1330
I'm inserting a CSV File into a MySQL Table. One row of the CSV file has a name with & Symbol like this:
Peter & Peter
Shortly befor the Database Insert, the echo-statement of $Variable gives "Peter & Peter" and until here, String looks fine. But after the Insert, Database shows:
Peter & Peter
How can I INSERT "&"-Symbol into Database?
After Database Connection, I indicate all possible settings to UTF8:
# Database Connection here
$mysqli->query("SET NAMES 'utf8'");
$mysqli->set_charset("utf8");
$charset = $mysqli->character_set_name();
printf ("Current character set is %s\n", $charset);
Database parameters:
How can I INSERT "&"-Symbol into Database?
Upvotes: 0
Views: 3707