MySQL查询运行两次 [英] MySQL query runs twice
问题描述
我有一个php文件,其中包含PHP简单HTML DOM解析器:include("simple_html_dom.php");
此包含使我的mysql_query($query)
在页面上执行两次-如果我删除了包含,则mysql_query
运行良好-我也试图将包含在查询之后-同样的问题!
I have an php file in which I include the PHP Simple HTML DOM Parser: include("simple_html_dom.php");
This inclusion makes my mysql_query($query)
execute twice on my page - if I remove the inclusion , the mysql_query
runs fine - I also tried to put the inclusion after the query - same problem!
mysql_query("INSERT INTO table (abc) VALUES ('ok8')");
echo "x";
include("simple_html_dom.php");
这将导致我的表有2行,但浏览器中只有一个"x". (也尝试将echo
放在前面).请帮忙!
This results in 2 rows of my table but a single "x" in browser. (Also tried to put the echo
before). Please, help!
推荐答案
在之前添加对 debug_print_backtrace()的调用mysql_query()
.这样您就可以跟踪包含路径.
Add a call to debug_print_backtrace() before mysql_query()
. That will allow you to track the includes trail.
这篇关于MySQL查询运行两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!