diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index ed74dde41..49ba898ff 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -35,13 +35,15 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && } } else { // internal relations - PMA_query_as_cu('DELETE FROM '.$cfg['Server']['relation'].' WHERE ' + PMA_query_as_cu('DELETE FROM ' + . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' + . $cfg['Server']['relation'].' WHERE ' . 'master_db = \'' . PMA_sqlAddslashes($DB2) . '\'' - . 'AND master_table = \'' . PMA_sqlAddslashes($T2) . '\'' - . 'AND master_field = \'' . PMA_sqlAddslashes($F2) . '\'' - . 'AND foreign_db = \'' . PMA_sqlAddslashes($DB1) . '\'' - . 'AND foreign_table = \'' . PMA_sqlAddslashes($T1) . '\'' - . 'AND foreign_field = \'' . PMA_sqlAddslashes($F1) . '\'' + . ' AND master_table = \'' . PMA_sqlAddslashes($T2) . '\'' + . ' AND master_field = \'' . PMA_sqlAddslashes($F2) . '\'' + . ' AND foreign_db = \'' . PMA_sqlAddslashes($DB1) . '\'' + . ' AND foreign_table = \'' . PMA_sqlAddslashes($T1) . '\'' + . ' AND foreign_field = \'' . PMA_sqlAddslashes($F1) . '\'' , FALSE, PMA_DBI_QUERY_STORE); } PMD_return(1, 'strRelationDeleted');