So I am constantly getting this error even after modifying my table's character set using another solution found here on SO that worked fine for when I used node.js for my twitter bot. Does PDO override my changes, and if so, how can I fix that?
this is the SO post i am referencing: Incorrect string value: '\xF0\x9F\x8E\xB6\xF0\x9F...' MySQL
and tihs is how I am doing my pdo statement.
$sql = "INSERT INTO tweet (tweet, posted, Category_idCategory, Username)
VALUES (?, ?, ?, ?);";
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$notOther = false;
foreach (self::$politics as $result) {
if (strpos(strtolower($tweet), strtolower($result)) !== false) {
$notOther = true;
$execute = $dbh->prepare($sql);
$execute->execute(array($tweet, $date, 2, $username));
break;
}
}