| @@ 659-669 (lines=11) @@ | ||
| 656 | /** |
|
| 657 | * @inheritDoc |
|
| 658 | */ |
|
| 659 | public function hasColumn($tableName, $columnName) |
|
| 660 | { |
|
| 661 | $rows = $this->getTableInfo($tableName); |
|
| 662 | foreach ($rows as $column) { |
|
| 663 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 664 | return true; |
|
| 665 | } |
|
| 666 | } |
|
| 667 | ||
| 668 | return false; |
|
| 669 | } |
|
| 670 | ||
| 671 | /** |
|
| 672 | * @inheritDoc |
|
| @@ 435-445 (lines=11) @@ | ||
| 432 | /** |
|
| 433 | * @inheritDoc |
|
| 434 | */ |
|
| 435 | public function hasColumn($tableName, $columnName) |
|
| 436 | { |
|
| 437 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 438 | foreach ($rows as $column) { |
|
| 439 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 440 | return true; |
|
| 441 | } |
|
| 442 | } |
|
| 443 | ||
| 444 | return false; |
|
| 445 | } |
|
| 446 | ||
| 447 | /** |
|
| 448 | * @inheritDoc |
|