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

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

        nd_pdo_mysql 和 pdo_mysql 扩展之间有什么区别?

        时间:2023-10-04

            <bdo id='Ou2rX'></bdo><ul id='Ou2rX'></ul>
          • <small id='Ou2rX'></small><noframes id='Ou2rX'>

            <legend id='Ou2rX'><style id='Ou2rX'><dir id='Ou2rX'><q id='Ou2rX'></q></dir></style></legend>

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

                • 本文介绍了nd_pdo_mysql 和 pdo_mysql 扩展之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  出于某种原因,我们托管服务器上的 pdo_mysql PHP 扩展无法运行使用 MySQL 视图的查询,并显示此错误消息.

                  <块引用>

                  SQLSTATE[HY000]: 一般错误:1615 准备好的语句需要重新准备

                  (有一个讨论

                  由于 libmysql 以字符串形式返回数字类型,我使用 mysqlndnd_pdo_mysql 来获取本机/严格数据,以便数字类型作为字符串返回.

                  来自MySQL官网:https://dev.mysql.com/downloads/connector/php-mysqlnd/

                  <块引用>

                  用于 PHP mysqlnd 的 MySQL 本地驱动程序是 PHP 脚本语言的 MySQL 客户端库 libmysql 的直接替代品.

                  For some reason the pdo_mysql PHP extension, on our hosted server, fails to run a query that uses a MySQL view, with this error message.

                  SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared

                  (There is a discussion on Bug #42041 Prepared-Statement fails when MySQL-Server under load, as well as numerous questions on Stack Overflow.)

                  For some reason, the query using the view runs just fine, if we switch to using the nd_pdo_mysql extension, which is for the MySQL Native Driver (mysqlnd).

                  What is the difference between pdo_mysql and nd_pdo_mysql? Why would one be chosen over the other one?

                  Thanks.

                  解决方案

                  To connect to your MySQL server from PHP, there are two versions of drivers:

                  1. mysqlnd
                  2. libmysql

                  In order to connect to your MySQL server using mysqlnd driver, you use the nd_pdo_mysql extension, as seen in below screenshot.

                  Since libmysql returns numeric types as strings, I use mysqlnd with nd_pdo_mysql in order to get native/strict data, so that numeric types are NOT returned as Strings.

                  From the MySQL official website: https://dev.mysql.com/downloads/connector/php-mysqlnd/

                  The MySQL native driver for PHP mysqlnd is a drop-in replacement for the MySQL Client Library libmysql for the PHP script language.

                  这篇关于nd_pdo_mysql 和 pdo_mysql 扩展之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP PDO:获取样式 FETCH_CLASS 和 FETCH_INTO 是否获取到 下一篇:LOAD DATA LOCAL INFILE 在 php 5.5 中使用 PDO 不起作用

                  相关文章

                  最新文章

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

                  1. <small id='WZbfI'></small><noframes id='WZbfI'>

                  2. <legend id='WZbfI'><style id='WZbfI'><dir id='WZbfI'><q id='WZbfI'></q></dir></style></legend>

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