From 4580cf67683a575e956862c52b0836f405aeee58 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 23 Aug 2003 18:57:27 +0000 Subject: [PATCH] getForeigners returns constraints --- ChangeLog | 1 + libraries/relation.lib.php3 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 91a83a6a8..a51b81009 100755 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ $Source$ * lang/swedish: Updated, thanks to Björn T. Hallberg (bth). * lang/greek: update, thanks to Kyriakos Xagoraris (theremon) * libraries/sqlparser.lib.php3: extract the CONSTRAINTs for FOREIGN KEYs + * libraries/relation.lib.php3: getForeigners() returns also the constraint 2003-08-21 Marc Delisle * tbl_relation.php3: improve variables, remove some code diff --git a/libraries/relation.lib.php3 b/libraries/relation.lib.php3 index 21648307e..3805c1854 100644 --- a/libraries/relation.lib.php3 +++ b/libraries/relation.lib.php3 @@ -322,6 +322,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ // and in 'innodb', we won't get it twice if $source='both' // because we use $field as key + $foreign[$field]['constraint'] = $one_key['constraint']; + if (isset($one_key['ref_db_name'])) { $foreign[$field]['foreign_db'] = $one_key['ref_db_name']; } else {