Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function getForeignKeys(string $tableName, string $pkName, ?string $dbName = null): array { |
||
23 | $recordset = $this->dbInstance->query ( "SELECT * |
||
24 | FROM |
||
25 | information_schema.KEY_COLUMN_USAGE |
||
26 | WHERE |
||
27 | REFERENCED_TABLE_NAME = '" . $tableName . "' |
||
28 | AND REFERENCED_COLUMN_NAME = '" . $pkName . "' |
||
29 | AND TABLE_SCHEMA = '" . $dbName . "';" ); |
||
30 | return $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
31 | } |
||
44 |