• <legend id='M2Apv'><style id='M2Apv'><dir id='M2Apv'><q id='M2Apv'></q></dir></style></legend>

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

        <tfoot id='M2Apv'></tfoot>
      2. <small id='M2Apv'></small><noframes id='M2Apv'>

      3. PHP 将用户 ID 传递给 mysql 触发器

        PHP Pass user id to mysql trigger(PHP 将用户 ID 传递给 mysql 触发器)
        • <small id='DMFAc'></small><noframes id='DMFAc'>

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

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

                  <tbody id='DMFAc'></tbody>
                • <legend id='DMFAc'><style id='DMFAc'><dir id='DMFAc'><q id='DMFAc'></q></dir></style></legend>
                  <tfoot id='DMFAc'></tfoot>
                  本文介绍了PHP 将用户 ID 传递给 mysql 触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要创建一个日志表,正如预期的那样,我需要存储用户 ID 以及旧的和新的行值.

                  I need to create a log table and as expected I need to store the user id and the old and new row values.

                  问题是我想创建一个触发器来对我执行此操作,但我知道无法将参数发送到触发器.

                  The thing is that I want to create a trigger to do that to me but I know that is not possible to send parameters to triggers.

                  有没有办法做到这一点?

                  Is there a way to do that?

                  在此先感谢您的帮助.

                  推荐答案

                  另一个技巧:你可以使用基于连接的变量 @var.

                  Another hack: you can use connection based variable @var.

                  示例:

                    set @user_id = 321
                    update table .....
                    set @user_id = null;
                  

                  并且在更新触发器中你可以使用这个变量@user_id.

                  and in update trigger you can use this variable @user_id.

                  这篇关于PHP 将用户 ID 传递给 mysql 触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Proxy Authentication Required with cURL(cURL 需要代理身份验证)
                  How to use a SOCKS 5 proxy with cURL?(如何使用带有 cURL 的 SOCKS 5 代理?)
                  How to use HTTP_X_FORWARDED_FOR properly?(如何正确使用 HTTP_X_FORWARDED_FOR?)
                  file_get_contents behind a proxy?(代理后面的 file_get_contents ?)
                  pecl install cassandra throws: quot;error: Unable to load libcassandraquot;(pecl install cassandra 抛出:“错误:无法加载 libcassandra)
                  Installing php datastax driver on ubuntu(在 ubuntu 上安装 php datastax 驱动)
                      <bdo id='Xya3I'></bdo><ul id='Xya3I'></ul>

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

                        <tfoot id='Xya3I'></tfoot>

                          • <small id='Xya3I'></small><noframes id='Xya3I'>

                          • <legend id='Xya3I'><style id='Xya3I'><dir id='Xya3I'><q id='Xya3I'></q></dir></style></legend>

                              <tbody id='Xya3I'></tbody>