• <tfoot id='2jeY1'></tfoot>
      <bdo id='2jeY1'></bdo><ul id='2jeY1'></ul>

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

        <small id='2jeY1'></small><noframes id='2jeY1'>

      1. 无法使用 PHP 执行多个 MariaDB 查询

        Cannot execute multiple MariaDB queries using PHP(无法使用 PHP 执行多个 MariaDB 查询)

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

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

                • <bdo id='OR1cl'></bdo><ul id='OR1cl'></ul>
                    <tbody id='OR1cl'></tbody>
                  本文介绍了无法使用 PHP 执行多个 MariaDB 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 MariaDB 中执行 SQL 查询时遇到了一个小问题.所有 PHP 变量都不为空,我想同时执行两个查询.在 MySQL 中它可以工作,但在 MariaDB 服务器中我不能,因为我得到一个错误我有一个查询:

                  I have faced a slight problem with executing SQL query in MariaDB. All PHP variables are not empty and I would like to execute two queries at the same time. In MySQL it is working but in MariaDB server I cannot as I get an error I have a query:

                  UPDATE users SET name = $receivedName, email = $receivedEmail WHERE id = $id1; UPDATE posts SET id = $userid WHERE id = $receivedID
                  

                  我得到的错误:

                  You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UPDATE posts SET id = 50 WHERE id = 56 /* /takechange.php */' at line 1
                  

                  我知道执行分配给单个变量的两个查询并不是一个好主意,但目前我几乎无法更改任何代码.我想这不是如何在 MariaDB 中加入多个查询.你能告诉我如何编辑这个查询吗?

                  I know it is not a shiny idea to execute two queries which are assigned to single variable, but at the moment I can barely change any code. I guess this is not how to join multiple queries in MariaDB. Can you tell me how to edit this query?

                  提前致谢.

                  推荐答案

                  您需要使用 mysqli Multi Query 或执行您的语句单独.

                  You need to use mysqli Multi Query or execute your statements separately.

                  如您所知,您有多个正在传递的语句.

                  You have multiple statements being passed as you know.

                  多查询

                  执行一个或多个由 a 连接的查询分号.

                  Executes one or multiple queries which are concatenated by a semicolon.

                  这篇关于无法使用 PHP 执行多个 MariaDB 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I parse XML containing custom namespaces using SimpleXML?(如何使用 SimpleXML 解析包含自定义命名空间的 XML?)
                  SimpleXML SOAP response Namespace issues(SimpleXML SOAP 响应命名空间问题)
                  Problems with PHP namespaces and built-in classes, how to fix?(PHP 命名空间和内置类的问题,如何解决?)
                  Use php namespace inside function(在函数内部使用 php 命名空间)
                  unexpected #39;use#39; (T_USE) when trying to use composer(尝试使用作曲家时意外的“使用(T_USE))
                  PHP adding custom namespace using autoloader from composer(PHP使用来自作曲家的自动加载器添加自定义命名空间)

                  1. <legend id='UD0T1'><style id='UD0T1'><dir id='UD0T1'><q id='UD0T1'></q></dir></style></legend>
                      1. <tfoot id='UD0T1'></tfoot>

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

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

                          <tbody id='UD0T1'></tbody>

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