<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 以保持事务一致性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <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>