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

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

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

        • <bdo id='JnVQX'></bdo><ul id='JnVQX'></ul>
      1. 在 php 中获取 DATETIME 并将其发布到 MySQL 以保持事务一致性

        Get DATETIME in php and post it to MySQL for transaction consistency(在 php 中获取 DATETIME 并将其发布到 MySQL 以保持事务一致性)
      2. <i id='5FLAn'><tr id='5FLAn'><dt id='5FLAn'><q id='5FLAn'><span id='5FLAn'><b id='5FLAn'><form id='5FLAn'><ins id='5FLAn'></ins><ul id='5FLAn'></ul><sub id='5FLAn'></sub></form><legend id='5FLAn'></legend><bdo id='5FLAn'><pre id='5FLAn'><center id='5FLAn'></center></pre></bdo></b><th id='5FLAn'></th></span></q></dt></tr></i><div id='5FLAn'><tfoot id='5FLAn'></tfoot><dl id='5FLAn'><fieldset id='5FLAn'></fieldset></dl></div>
        • <small id='5FLAn'></small><noframes id='5FLAn'>

          <tfoot id='5FLAn'></tfoot>

                <bdo id='5FLAn'></bdo><ul id='5FLAn'></ul>
                  <tbody id='5FLAn'></tbody>
                <legend id='5FLAn'><style id='5FLAn'><dir id='5FLAn'><q id='5FLAn'></q></dir></style></legend>

                  本文介绍了在 php 中获取 DATETIME 并将其发布到 MySQL 以保持事务一致性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这里是这个问题背后的原因的链接:NOW() 保证 DATETIME InnoDB 事务?

                  Here is a link to the reason behind this question: NOW() for DATETIME InnoDB Transaction guaranteed?

                  因此,为了确保具有任意数量查询(例如20+ 个查询)的单个事务在多个表中具有 100% 准确且一致的 NOW() 值,使用 NOW()(不是当前的 TIMESTAMP)分配等效于 DATETIME 的变量的 php 方法是什么.

                  So to ensure a single transaction with any number of queries (20+ queries for example) has a 100% accurate and consistent NOW() value accross multiple tables, what is the php way to assign a variable equivalent of DATETIME using NOW() (not current TIMESTAMP).

                  推荐答案

                  一种方法可能是:

                  <?php
                  $nowFormat = date('Y-m-d H:i:s');
                  $sql = "INSERT INTO table SET field='$nowFormat'";
                  $sql2 = "INSERT INTO table SET field='$nowFormat'";
                  ...
                  

                  这篇关于在 php 中获取 DATETIME 并将其发布到 MySQL 以保持事务一致性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                  <legend id='Ol5rJ'><style id='Ol5rJ'><dir id='Ol5rJ'><q id='Ol5rJ'></q></dir></style></legend>

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

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

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