Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function getFieldsInfos(string $tableName): array { |
||
34 | $fieldsInfos = array (); |
||
35 | $recordset = $this->dbInstance->query ( "SHOW COLUMNS FROM `{$tableName}`" ); |
||
36 | $fields = $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
37 | foreach ( $fields as $field ) { |
||
38 | $fieldsInfos [$field ['Field']] = [ "Type" => $field ['Type'],"Nullable" => $field ["Null"] ]; |
||
39 | } |
||
40 | return $fieldsInfos; |
||
41 | } |
||
44 |