remove double include

This commit is contained in:
Steve Alberty
2001-06-27 11:36:36 +00:00
parent f3a0a5d6cc
commit 25f588da25

View File

@@ -52,6 +52,7 @@ $sql_query_cpy = $sql_query; // copy the query, used for display purposes only
if($sql_query != "") { if($sql_query != "") {
$sql_query = remove_remarks($sql_query); $sql_query = remove_remarks($sql_query);
$pieces = split_sql_file($sql_query,";"); $pieces = split_sql_file($sql_query,";");
$piecescount=count($pieces);
if (count($pieces) == 1 && !empty($pieces[0]) && $view_bookmark == 0) { if (count($pieces) == 1 && !empty($pieces[0]) && $view_bookmark == 0) {
$sql_query = trim($pieces[0]); $sql_query = trim($pieces[0]);
@@ -60,10 +61,9 @@ if($sql_query != "") {
exit; exit;
} }
include("./header.inc.php3");
if(mysql_select_db($db)) { if(mysql_select_db($db)) {
// run multiple queries // run multiple queries
for ($i=0; $i<count($pieces); $i++) { for ($i=0; $i<$piecescount; $i++) {
$sql = trim($pieces[$i]); $sql = trim($pieces[$i]);
if(!empty($sql) and $sql[0] != "#") $result = mysql_query($sql) or mysql_die2($sql); if(!empty($sql) and $sql[0] != "#") $result = mysql_query($sql) or mysql_die2($sql);
if (!isset($reload) && eregi('^CREATE TABLE (.+)', $pieces[$i])) $reload = "true"; if (!isset($reload) && eregi('^CREATE TABLE (.+)', $pieces[$i])) $reload = "true";