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

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

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

      在页面加载时插入查询,插入两次?

      Insert query on page load, inserts twice?(在页面加载时插入查询,插入两次?)

      • <bdo id='0w5ZM'></bdo><ul id='0w5ZM'></ul>
        <legend id='0w5ZM'><style id='0w5ZM'><dir id='0w5ZM'><q id='0w5ZM'></q></dir></style></legend><tfoot id='0w5ZM'></tfoot>

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

                  <tbody id='0w5ZM'></tbody>

                <small id='0w5ZM'></small><noframes id='0w5ZM'>

              1. 本文介绍了在页面加载时插入查询,插入两次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在我的游戏页面上,我有一个他们玩游戏的页面.在那个页面上我有一个查询

                On my games page, I have a page where they play a game. On that page I have a query

                $insert_user_activity = mysql_query("INSERT INTO game_activity (user_id,user_full_name,game_id,game_name) values ('$user_id','$full_name','$browser_id','$game_title')");
                

                它将它记录到我的数据库中,它只是独立存在,当我刷新页面时,由于某种原因它被提交到数据库两次.

                Which will log it into my database, it's just sitting on its own and when I refresh the page, it is submitted to the database twice for some reason.

                推荐答案

                你的前端控制器逻辑错误.

                对您的网站发出的每个请求都会调用您执行此查询的页面,无论它是正确的请求还是对不存在的资源的调用.

                The page where you are executing this query is called on every request made to your site, no matter whether it's a proper request or a call to a non-existent resource.

                您必须更改前端控制器的逻辑,使其不会针对无效请求运行应用程序.否则网站上线时将不会有一个而是数千个错误插入.

                You must change the logic of the front controller so it wouldn't run the application for the invalid requests. Otherwise there will be not one but thousands false inserts when the site goes live.

                这篇关于在页面加载时插入查询,插入两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 的问题)
                  <tbody id='AOzkH'></tbody>

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

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