| @@ 338-351 (lines=14) @@ | ||
| 335 | /** |
|
| 336 | * {@inheritdoc} |
|
| 337 | */ |
|
| 338 | public function hasColumn($tableName, $columnName) |
|
| 339 | { |
|
| 340 | $sql = sprintf( |
|
| 341 | "SELECT count(*) |
|
| 342 | FROM information_schema.columns |
|
| 343 | WHERE table_schema = '%s' AND table_name = '%s' AND column_name = '%s'", |
|
| 344 | $this->getSchemaName(), |
|
| 345 | $tableName, |
|
| 346 | $columnName |
|
| 347 | ); |
|
| 348 | ||
| 349 | $result = $this->fetchRow($sql); |
|
| 350 | ||
| 351 | return $result['count'] > 0; |
|
| 352 | } |
|
| 353 | ||
| 354 | /** |
|
| @@ 411-423 (lines=13) @@ | ||
| 408 | /** |
|
| 409 | * {@inheritdoc} |
|
| 410 | */ |
|
| 411 | public function hasColumn($tableName, $columnName) |
|
| 412 | { |
|
| 413 | $sql = sprintf( |
|
| 414 | "SELECT count(*) as [count] |
|
| 415 | FROM information_schema.columns |
|
| 416 | WHERE table_name = '%s' AND column_name = '%s'", |
|
| 417 | $tableName, |
|
| 418 | $columnName |
|
| 419 | ); |
|
| 420 | $result = $this->fetchRow($sql); |
|
| 421 | ||
| 422 | return $result['count'] > 0; |
|
| 423 | } |
|
| 424 | ||
| 425 | /** |
|
| 426 | * {@inheritdoc} |
|