| @@ 348-361 (lines=14) @@ | ||
| 345 | /** |
|
| 346 | * {@inheritdoc} |
|
| 347 | */ |
|
| 348 | public function hasColumn($tableName, $columnName) |
|
| 349 | { |
|
| 350 | $sql = sprintf( |
|
| 351 | "SELECT count(*) |
|
| 352 | FROM information_schema.columns |
|
| 353 | WHERE table_schema = '%s' AND table_name = '%s' AND column_name = '%s'", |
|
| 354 | $this->getSchemaName(), |
|
| 355 | $tableName, |
|
| 356 | $columnName |
|
| 357 | ); |
|
| 358 | ||
| 359 | $result = $this->fetchRow($sql); |
|
| 360 | return $result['count'] > 0; |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|
| 364 | * {@inheritdoc} |
|
| @@ 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} |
|