1 year ago

#382072

test-img

sss

Add emoji to mysql

When I add an emoji to the database, it appears as (???)

Use this method to add and update data

$post_Text = 'Wh22 🔥🔥🔥';   
$update_post =$database->prepare("UPDATE `Wo_Posts` SET `postText` = :postText WHERE `Wo_Posts`.`id` = 7346"); 
$update_post->bindParam("postText",$post_Text);
$update_post->execute();

The result in the database was like this

Wh22 ???????????? 

The collation I use is utf8mb4_unicode_ci

php

mysql

sql

json

emoji

0 Answers

Your Answer

Accepted video resources