@@ 374-387 (lines=14) @@ | ||
371 | /** |
|
372 | * {@inheritdoc} |
|
373 | */ |
|
374 | public function hasColumn($tableName, $columnName) |
|
375 | { |
|
376 | $sql = sprintf( |
|
377 | "SELECT count(*) |
|
378 | FROM information_schema.columns |
|
379 | WHERE table_schema = '%s' AND table_name = '%s' AND column_name = '%s'", |
|
380 | $this->getSchemaName(), |
|
381 | $tableName, |
|
382 | $columnName |
|
383 | ); |
|
384 | ||
385 | $result = $this->fetchRow($sql); |
|
386 | ||
387 | return $result['count'] > 0; |
|
388 | } |
|
389 | ||
390 | /** |
@@ 413-425 (lines=13) @@ | ||
410 | /** |
|
411 | * {@inheritdoc} |
|
412 | */ |
|
413 | public function hasColumn($tableName, $columnName) |
|
414 | { |
|
415 | $sql = sprintf( |
|
416 | "SELECT count(*) as [count] |
|
417 | FROM information_schema.columns |
|
418 | WHERE table_name = '%s' AND column_name = '%s'", |
|
419 | $tableName, |
|
420 | $columnName |
|
421 | ); |
|
422 | $result = $this->fetchRow($sql); |
|
423 | ||
424 | return $result['count'] > 0; |
|
425 | } |
|
426 | ||
427 | /** |
|
428 | * {@inheritdoc} |