Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function getPrimaryKeys(string $tableName): array { |
||
13 | $fieldkeys = array (); |
||
14 | $recordset = $this->dbInstance->query ( "SHOW KEYS FROM `{$tableName}` WHERE Key_name = 'PRIMARY'" ); |
||
15 | $keys = $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
16 | foreach ( $keys as $key ) { |
||
17 | $fieldkeys [] = $key ['Column_name']; |
||
18 | } |
||
19 | return $fieldkeys; |
||
20 | } |
||
44 |