| @@ 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 | ||
| 361 | return $result['count'] > 0; |
|
| 362 | } |
|
| 363 | ||
| 364 | /** |
|
| @@ 421-433 (lines=13) @@ | ||
| 418 | /** |
|
| 419 | * {@inheritdoc} |
|
| 420 | */ |
|
| 421 | public function hasColumn($tableName, $columnName) |
|
| 422 | { |
|
| 423 | $sql = sprintf( |
|
| 424 | "SELECT count(*) as [count] |
|
| 425 | FROM information_schema.columns |
|
| 426 | WHERE table_name = '%s' AND column_name = '%s'", |
|
| 427 | $tableName, |
|
| 428 | $columnName |
|
| 429 | ); |
|
| 430 | $result = $this->fetchRow($sql); |
|
| 431 | ||
| 432 | return $result['count'] > 0; |
|
| 433 | } |
|
| 434 | ||
| 435 | /** |
|
| 436 | * {@inheritdoc} |
|