<small id='UMDvX'></small><noframes id='UMDvX'>

      • <bdo id='UMDvX'></bdo><ul id='UMDvX'></ul>

      <tfoot id='UMDvX'></tfoot>
    1. <legend id='UMDvX'><style id='UMDvX'><dir id='UMDvX'><q id='UMDvX'></q></dir></style></legend>
    2. <i id='UMDvX'><tr id='UMDvX'><dt id='UMDvX'><q id='UMDvX'><span id='UMDvX'><b id='UMDvX'><form id='UMDvX'><ins id='UMDvX'></ins><ul id='UMDvX'></ul><sub id='UMDvX'></sub></form><legend id='UMDvX'></legend><bdo id='UMDvX'><pre id='UMDvX'><center id='UMDvX'></center></pre></bdo></b><th id='UMDvX'></th></span></q></dt></tr></i><div id='UMDvX'><tfoot id='UMDvX'></tfoot><dl id='UMDvX'><fieldset id='UMDvX'></fieldset></dl></div>

      php mysql SET NAMES 'utf8' COLLATE 'utf8_unicode_

      时间:2023-07-29

      <i id='nVjBQ'><tr id='nVjBQ'><dt id='nVjBQ'><q id='nVjBQ'><span id='nVjBQ'><b id='nVjBQ'><form id='nVjBQ'><ins id='nVjBQ'></ins><ul id='nVjBQ'></ul><sub id='nVjBQ'></sub></form><legend id='nVjBQ'></legend><bdo id='nVjBQ'><pre id='nVjBQ'><center id='nVjBQ'></center></pre></bdo></b><th id='nVjBQ'></th></span></q></dt></tr></i><div id='nVjBQ'><tfoot id='nVjBQ'></tfoot><dl id='nVjBQ'><fieldset id='nVjBQ'></fieldset></dl></div>
      <tfoot id='nVjBQ'></tfoot>

      <small id='nVjBQ'></small><noframes id='nVjBQ'>

        <legend id='nVjBQ'><style id='nVjBQ'><dir id='nVjBQ'><q id='nVjBQ'></q></dir></style></legend>
          <tbody id='nVjBQ'></tbody>

            <bdo id='nVjBQ'></bdo><ul id='nVjBQ'></ul>

              • 本文介绍了php mysql SET NAMES 'utf8' COLLATE 'utf8_unicode_ci' 不适用于 mysqli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在将我的网站从 php mysql_* 方法迁移到 php mysqli.

                I am migrating my site into php mysqli from php mysql_* methods.

                我有以下代码来完成这项工作:

                I had following code that did the job:

                mysql_query("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'");

                mysql_query("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'");

                如果没有这个查询,我的字符串字符(格鲁吉亚语)是用问号写的.例如它被写成?????????而不是გამარჯობა

                Without this query my string characters (in Georgian language) were written with question marks. For example it was written ????????? instead of გამარჯობა

                所以既然它完成了它的工作,我很高兴,但现在我不能用 mysqli 做同样的事情.

                So since it did its job I was happy, but now I cannot do the same with mysqli.

                $mysqli = new mysqli("localhost", "root", "", "test");
                $mysqli->query("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'");
                

                谁能帮帮我?谢谢.

                推荐答案

                不建议使用 mysqli 查询来设置名称,而是使用 mysqli::set_charset

                It is not recommended to use mysqli query in order to set names but rather mysqli::set_charset

                $mysqli = new mysqli("localhost", "root", "", "test");
                $mysqli->set_charset("utf8");
                

                这篇关于php mysql SET NAMES 'utf8' COLLATE 'utf8_unicode_ci' 不适用于 mysqli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何在 php 中使用 bind_result() 而不是 get_result() 下一篇:来自 mysqli_Query 的回显结果

                相关文章

                最新文章

                • <bdo id='UDpd5'></bdo><ul id='UDpd5'></ul>

                <small id='UDpd5'></small><noframes id='UDpd5'>

                  1. <i id='UDpd5'><tr id='UDpd5'><dt id='UDpd5'><q id='UDpd5'><span id='UDpd5'><b id='UDpd5'><form id='UDpd5'><ins id='UDpd5'></ins><ul id='UDpd5'></ul><sub id='UDpd5'></sub></form><legend id='UDpd5'></legend><bdo id='UDpd5'><pre id='UDpd5'><center id='UDpd5'></center></pre></bdo></b><th id='UDpd5'></th></span></q></dt></tr></i><div id='UDpd5'><tfoot id='UDpd5'></tfoot><dl id='UDpd5'><fieldset id='UDpd5'></fieldset></dl></div>
                    <tfoot id='UDpd5'></tfoot>
                    <legend id='UDpd5'><style id='UDpd5'><dir id='UDpd5'><q id='UDpd5'></q></dir></style></legend>