| @@ 419-431 (lines=13) @@ | ||
| 416 | /** |
|
| 417 | * {@inheritdoc} |
|
| 418 | */ |
|
| 419 | public function hasColumn($tableName, $columnName) |
|
| 420 | { |
|
| 421 | $sql = sprintf( |
|
| 422 | "SELECT count(*) as [count] |
|
| 423 | FROM information_schema.columns |
|
| 424 | WHERE table_name = '%s' AND column_name = '%s'", |
|
| 425 | $tableName, |
|
| 426 | $columnName |
|
| 427 | ); |
|
| 428 | $result = $this->fetchRow($sql); |
|
| 429 | ||
| 430 | return $result['count'] > 0; |
|
| 431 | } |
|
| 432 | ||
| 433 | /** |
|
| 434 | * {@inheritdoc} |
|
| @@ 351-364 (lines=14) @@ | ||
| 348 | /** |
|
| 349 | * {@inheritdoc} |
|
| 350 | */ |
|
| 351 | public function hasColumn($tableName, $columnName) |
|
| 352 | { |
|
| 353 | $sql = sprintf( |
|
| 354 | "SELECT count(*) |
|
| 355 | FROM information_schema.columns |
|
| 356 | WHERE table_schema = '%s' AND table_name = '%s' AND column_name = '%s'", |
|
| 357 | $this->getSchemaName(), |
|
| 358 | $tableName, |
|
| 359 | $columnName |
|
| 360 | ); |
|
| 361 | ||
| 362 | $result = $this->fetchRow($sql); |
|
| 363 | return $result['count'] > 0; |
|
| 364 | } |
|
| 365 | ||
| 366 | /** |
|
| 367 | * {@inheritdoc} |
|