From dc6c010dddd3d6ad8efc62cbecfa1909f6bcbfac Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 11 May 2008 13:11:10 +0000 Subject: [PATCH] deleting internal relation no longer worked --- pmd_relation_upd.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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');