zoukankan      html  css  js  c++  java
  • SET NAMES

    High Performance MySQL, Third Editionby Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko

    Settings for client/server communication When the server and the client communicate with each other, they might send data back and forth in different character sets. The server will translate as needed:

    • The server assumes the client is sending statements in the character set specifiedby character_set_client.

    • After the server receives a statement from the client, it translates it into the characterset specified by character_set_connection. It also uses this setting to determinehow to convert numbers into strings.

    • When the server returns results or error messages back to the client, it translatesthem into character_set_result.

    Suppose you open a client connection with latin1 (the default character set, unless you’ve used mysql_options() to change it) and then use SET NAMES utf8 to tell the serverto assume the client is sending data in UTF-8. You’ve created a character set mismatch,which can cause errors and even security problems.

  • 相关阅读:
    数据类型的总结
    typeof加括号和不加括号的区别
    排序
    数据类型分为哪两类
    css中需要更小的字体如何实现
    一些细节注意点
    数值转换题
    如何用分支结构计算年份
    Scout YYF I
    D. AND, OR and square sum
  • 原文地址:https://www.cnblogs.com/rsapaper/p/5838445.html
Copyright © 2011-2022 走看看