You are here

function dba_show_create_table in Database Administration 5

Same name and namespace in other branches
  1. 7 dba.admin.inc \dba_show_create_table()

Related topics

1 call to dba_show_create_table()
dba_backup_table in ./dba.module
Backup table to file.

File

./dba.module, line 1462
Allows administrators direct access to their Drupal database. Written by Jeremy Andrews <jeremy@kerneltrap.org>, June 2004. PostgreSQL functionality provided by AAM <aam@ugpl.de> Major security audit, porting, and maintenance by Derek…

Code

function dba_show_create_table($table) {
  if (_is_mysql()) {
    $query = "SHOW CREATE TABLE {$table};";
  }
  else {
    drupal_set_message(t('Support for showing the command used to create a table is not currently available in this module for PostgreSQL.'), 'error');
  }
  drupal_set_message(check_plain($query));
  return db_fetch_array(db_query($query));
}