PHP执行Insert,产生2条重复记录,该如何解决
PHP执行Insert,产生2条重复记录
如题。在页面中有多条sql语句,插入订单表没有重复记录,但是插入到记录表里就时不时的产生重复记录。有高手指点吗?
------解决方案--------------------
你是用GG浏览器在调试吗?
------解决方案--------------------
给表单加上ticket,借助SESSION防重复提交吧,能好点.
------解决方案--------------------
我看到的只有
$sqlstr5 = "INSERT INTO `online_saving_record`
(`online_saving_record_name`,`online_saving_record_money`,
`online_saving_record_golds`,`online_saving_record_time`,`into_member`)
values('$attach',$money,$amount,'$time','$arr1[into_member]')";//把记录写入充值记录表
能影响记录表,你贴出来的其他代码好像对问题没什么影响,因为你都是讲变量分别放入这2个表的,现在问题是如果订单表没有重复记录,肯定是没有重复提交表单,只有sql5给重复执行了 检查下你代码块中的IF语句 和‘}’,看有没有问题,不过就你提交的代码而言,真搞不懂哪出问题了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The hype for Black Myth: Wukong has been felt globally as the game slowly crawled towards its launch date, and it didn't disappoint when it launched on August 20, having received a very warm welcome from the gaming community at large. After being onl

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

On September 6, 2024, YouTubers Matthew Perkins, known as DIY Perks, and Arun Maini, aka MrWhoseTheBoss, broke an insane record: they built the world's largest, fully functional iPhone 15 Pro Max. The gigantic smartphone measures 2.02 meters and weig

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没问题。

图片消失如何解决先是图片文件上传$file=$_FILES['userfile']; if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'

Rockstar Games recently added BattleEye anti-cheat to Grand Theft Auto V, seemingly deliberately breaking Linux support in the process, leaving Steam Deck owners out in the cold, and placing the blame for Steam Deck incompatibility squarely on the sh

图片消失如何解决先是图片文件上传$file=$_FILES['userfile']; if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'
