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