| @@ 366-376 (lines=11) @@ | ||
| 363 | /** | |
| 364 |      * {@inheritdoc} | |
| 365 | */ | |
| 366 | public function hasColumn($tableName, $columnName) | |
| 367 |     { | |
| 368 |         $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); | |
| 369 |         foreach ($rows as $column) { | |
| 370 |             if (strcasecmp($column['Field'], $columnName) === 0) { | |
| 371 | return true; | |
| 372 | } | |
| 373 | } | |
| 374 | ||
| 375 | return false; | |
| 376 | } | |
| 377 | ||
| 378 | /** | |
| 379 |      * {@inheritdoc} | |
| @@ 300-310 (lines=11) @@ | ||
| 297 | /** | |
| 298 |      * {@inheritdoc} | |
| 299 | */ | |
| 300 | public function hasColumn($tableName, $columnName) | |
| 301 |     { | |
| 302 |         $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); | |
| 303 |         foreach ($rows as $column) { | |
| 304 |             if (strcasecmp($column['name'], $columnName) === 0) { | |
| 305 | return true; | |
| 306 | } | |
| 307 | } | |
| 308 | ||
| 309 | return false; | |
| 310 | } | |
| 311 | ||
| 312 | /** | |
| 313 |      * {@inheritdoc} | |