From ba6218d707486ccaca310247468c24e020138131 Mon Sep 17 00:00:00 2001 From: MGatner Date: Mon, 9 Sep 2019 10:44:05 -0400 Subject: [PATCH] Add getForeignKeyData to User Guide --- user_guide_src/source/database/metadata.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/user_guide_src/source/database/metadata.rst b/user_guide_src/source/database/metadata.rst index 2efd41b880cc..d7a08b5ce6b9 100644 --- a/user_guide_src/source/database/metadata.rst +++ b/user_guide_src/source/database/metadata.rst @@ -150,3 +150,19 @@ Usage example:: The key types may be unique to the database you are using. For instance, MySQL will return one of primary, fulltext, spatial, index or unique for each key associated with a table. + +**$db->getForeignKeyData()** + +Returns an array of objects containing foreign key information. + +Usage example:: + + $keys = $db->getForeignKeyData('table_name'); + + foreach ($keys as $key) + { + echo $key->constraint_name; + echo $key->table_name; + echo $key->foreign_table_name; + } +