To prevent garbled characters, I'm setting up several character sets for DB:
mysqli_query($db,"SET NAMES UTF8"); mysqli_query($db,"set character_set_client=utf8"); mysqli_query($db,"set character_set_connection=utf8"); mysqli_query($db,"set character_set_results=utf8");
But I see an article saying this:
http://zhangxugg-163-com.iteye.com/blog/1835721
According to the above description, SET NAMES UTF8
does one have equal to set character_set_client=utf8; set character_set_connection=utf8; set character_set_results=utf8;
these three articles?
Let's talk.
.`
Reply content:
To prevent garbled characters, I'm setting up several character sets for DB:
mysqli_query($db,"SET NAMES UTF8"); mysqli_query($db,"set character_set_client=utf8"); mysqli_query($db,"set character_set_connection=utf8"); mysqli_query($db,"set character_set_results=utf8");
But I see an article saying this:
http://zhangxugg-163-com.iteye.com/blog/1835721
According to the above description, SET NAMES UTF8
does one have equal to set character_set_client=utf8; set character_set_connection=utf8; set character_set_results=utf8;
these three articles?
Let's talk.
.`
set NAMES utf8show variables like "character_set_%"
The operation is shown like this
As answered above, changed the Character_set_client/character_set_connection/character_set_results three values
Yes, one command equals your list of 3, mainly to ensure that the encoding consistency is not garbled