Gabriel Lupu
Gabriel Lupu

Reputation: 1829

MySQL query runs twice

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");

This results in 2 rows of my table but a single "x" in browser. (Also tried to put the echo before). Please, help!

Upvotes: 3

Views: 3290

Answers (1)

Álvaro González
Álvaro González

Reputation: 146450

Add a call to debug_print_backtrace() before mysql_query(). That will allow you to track the includes trail.

Upvotes: 4

Related Questions