You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SET NAMES indicates what character set the client will use to send SQL statements to the server. Thus, SET NAMES 'utf8mb4' tells the server, “future incoming messages from this client are in character set utf8mb4. It also specifies the character set that the server should use for sending results back to the client. (For example, it indicates what character set to use for column values if you use a SELECT statement.)
I am so helped with this answer
I was confused with this issue, I tried many ways to fix it.
But finally, my actual problem is about the syntax, this syntax is the best that I can use
SET NAMES
indicates what character set the client will use to send SQL statements to the server. Thus,SET NAMES 'utf8mb4'
tells the server, “future incoming messages from this client are in character set utf8mb4. It also specifies the character set that the server should use for sending results back to the client. (For example, it indicates what character set to use for column values if you use aSELECT
statement.)https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html
I would suggest to update the PDO example like this:
What do you think?
Edit: Added
COLLATE utf8mb4_unicode_ci
The text was updated successfully, but these errors were encountered: