|
|
|
@@ -18,7 +18,7 @@ function PMA_relationsCleanupColumn($db, $table, $column) {
|
|
|
|
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
|
|
|
|
. ' AND column_name = \'' . PMA_sqlAddslashes(urldecode($column)) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['displaywork']) {
|
|
|
|
@@ -27,7 +27,7 @@ function PMA_relationsCleanupColumn($db, $table, $column) {
|
|
|
|
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
|
|
|
|
. ' AND display_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['relwork']) {
|
|
|
|
@@ -36,14 +36,14 @@ function PMA_relationsCleanupColumn($db, $table, $column) {
|
|
|
|
|
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
|
|
|
|
|
. ' AND master_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['relation'])
|
|
|
|
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
|
|
|
|
|
. ' AND foreign_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -55,7 +55,7 @@ function PMA_relationsCleanupTable($db, $table) {
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['displaywork']) {
|
|
|
|
@@ -63,7 +63,7 @@ function PMA_relationsCleanupTable($db, $table) {
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['pdfwork']) {
|
|
|
|
@@ -71,7 +71,7 @@ function PMA_relationsCleanupTable($db, $table) {
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['relwork']) {
|
|
|
|
@@ -79,13 +79,13 @@ function PMA_relationsCleanupTable($db, $table) {
|
|
|
|
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['relation'])
|
|
|
|
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
|
|
|
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -96,45 +96,45 @@ function PMA_relationsCleanupDatabase($db) {
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_info'])
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['bookmarkwork']) {
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['bookmark'])
|
|
|
|
|
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['displaywork']) {
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_info'])
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['pdfwork']) {
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords'])
|
|
|
|
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($cfgRelation['relwork']) {
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['relation'])
|
|
|
|
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
|
|
|
|
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['relation'])
|
|
|
|
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
|
|
|
|
$rmv_rs = PMA_query_as_cu($remove_query);
|
|
|
|
|
unset($rmv_query);
|
|
|
|
|
unset($remove_query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|