刷新页面INSERT到数据库中 [英] Refreshing the page INSERTs into the database

查看:86
本文介绍了刷新页面INSERT到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我12岁,需要帮助我的代码,当我按下刷新按钮时,它会将数据重新发布到数据库中并最终重新发布评论。这可能是不好的,因为如果某人(不要想到这样做)按下一堆刷新按钮(我意味着一堆)它可以填满我的服务器然后降低我的带宽。这是我的代码

I am 12 and need help with my code, when I press the refresh button it reposts the data into the database and utmately reposts the comment. This could be bad because if someone (Don''t Even Think About Doing This) presses the refresh button a bunch (And I Mean A Bunch) it could fill up my server then bring down my bandwidth. Here is my code

展开 | 选择 | Wrap | 行号

推荐答案

重命名线程以更好地匹配内容。


Heya,rcmatt4321。欢迎来到TSDN!


关于我能想到的最简单的方法就是为你的表添加一个唯一的密钥。登录到您的MySQL服务器并输入:

Renamed the thread to better match contents.

Heya, rcmatt4321. Welcome to TSDN!

About the easiest way I can think of to put a stop to this is to add a unique key to your table. Log in to your MySQL server and type:

展开 | 选择 | Wrap | 行号



重命名线程以更好地匹配内容。
Renamed the thread to better match contents.



对不起!谢谢!

Sorry! Thanks!


非常感谢你!当我完成作业时,我会这样做。 :)


马特
Thank you so much! I''ll do that when I finish my homework. :)

Matt


这篇关于刷新页面INSERT到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆