Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function getPrimaryKeys($tableName): array { |
||
26 | $fieldkeys = array (); |
||
27 | $recordset = $this->dbInstance->query ( "PRAGMA TABLE_INFO(".$table_name.");" ); |
||
|
|||
28 | $keys = $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
29 | foreach ( $keys as $key ) { |
||
30 | if ($key['pk']==1) { |
||
31 | $fieldkeys[] = $key['name']; |
||
32 | } |
||
33 | } |
||
34 | return $fieldkeys; |
||
35 | } |
||
48 |