and ezuser.login = post.author  
上述sql条件 的login是utf-8编码,author是latin编码如果两边都是英文的没什么问题,如果是中文 则数据丢失,
寻求解决办法,等待中。

解决方案 »

  1.   

    谢谢先;
    不是那个意思
    post.author是数据latin 编码  我要把数据转成utf8编码
      

  2.   

    楼上的对不起, 我说的不是很清楚,
    我说的只能用phpmyadnmin 来操作 ,
    就是只写sql语句来完成。
      

  3.   

    post.author是数据latin 编码  我要把数据转成utf8编码
    ------------------------------------还是不明白, 你的"and ezuser.login = post.author " 不是sql语句吗? post不是表吗? author是不是字段名?
      

  4.   

    post是表,author是字段名 问题是这个字段是latin编码,我现在要把数据变成utf8 编码
    不然 中文数据会丢失,,因为前面的 login 字段是 utf8 编码 。
      

  5.   

    and ezuser.login=CONVERT(post.author USING utf8)
      

  6.   

    and CONVERT(ezuser.login USING utf8)=CONVERT(post.author USING utf8)
      

  7.   

    当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
      

  8.   


    嗯,对了,你是从latin1转,肯定没用,因为Latin1里没中文,中文都当成2个欧洲字符转了.....你这个要么导出导入一下,转成gbk再用....当然如果可以直接转utf8更省事...
    要不然...等我一下
      

  9.   

    and convert(convert(ezuser.login using gbk) using binary)=convert(post.author using binary)这样比应无问题,已测试,
    我看看能否再简单点
      

  10.   

    ezuser.login=convert(convert(post.author using binary) using gbk)貌似这样也行