@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function listTables() |
| 82 | 82 | { |
| 83 | 83 | return $this->conn->query( |
| 84 | - 'SELECT table_name FROM information_schema.tables WHERE table_schema = \'' . $this->tableSchema . '\'' |
|
| 84 | + 'SELECT table_name FROM information_schema.tables WHERE table_schema = \''.$this->tableSchema.'\'' |
|
| 85 | 85 | )->fetchAll(\PDO::FETCH_COLUMN, 0); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -149,13 +149,13 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function listFields($table) |
| 151 | 151 | { |
| 152 | - $sth = $this->conn->query('SELECT * FROM information_schema.columns WHERE table_name =\'' . $table . '\''); |
|
| 152 | + $sth = $this->conn->query('SELECT * FROM information_schema.columns WHERE table_name =\''.$table.'\''); |
|
| 153 | 153 | $result = []; |
| 154 | 154 | |
| 155 | 155 | foreach ($sth->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
| 156 | 156 | $result[] = [ |
| 157 | 157 | 'field' => $row['column_name'], |
| 158 | - 'type' => $row['data_type'] . (($max = $row['character_maximum_length']) ? '(' . $max . ')' : ''), |
|
| 158 | + 'type' => $row['data_type'].(($max = $row['character_maximum_length']) ? '('.$max.')' : ''), |
|
| 159 | 159 | 'null' => $row['is_nullable'], |
| 160 | 160 | 'default' => $row['column_default'] |
| 161 | 161 | ]; |
@@ -192,8 +192,8 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function insert($table, array $line = [], $multi = false) |
| 194 | 194 | { |
| 195 | - $fields = '"' . implode('", "', array_keys($multi ? $line[0] : $line)) . '"'; |
|
| 196 | - $values = ':' . implode(', :', array_keys($multi ? $line[0] : $line)); |
|
| 195 | + $fields = '"'.implode('", "', array_keys($multi ? $line[0] : $line)).'"'; |
|
| 196 | + $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line)); |
|
| 197 | 197 | $rows = $multi ? $line : [$line]; |
| 198 | 198 | $id = null; |
| 199 | 199 | |