ix some errors about whether to display table name or not at the top of the page

This commit is contained in:
Loïc Chapeaux
2001-08-28 16:09:35 +00:00
parent d99ac01040
commit 172baede1a
4 changed files with 22 additions and 9 deletions

View File

@@ -104,7 +104,7 @@ if ($sql_query != '') {
if (get_magic_quotes_gpc() == 1) {
$sql_query = addslashes($sql_query);
}
if (eregi('^(DROP|CREATE) +(TABLE|DATABASE) +(.+)', $sql_query)) {
if (eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $sql_query)) {
$reload = 'true';
}
include('./sql.php3');
@@ -122,7 +122,7 @@ if ($sql_query != '') {
break;
}
}
if (!isset($reload) && eregi('^(DROP|CREATE) +(TABLE|DATABASE) +(.+)', $a_sql_query)) {
if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
$reload = 'true';
}
} // end for