You are here

function dba_delete_table in Database Administration 5

Delete table contents.

Related topics

1 call to dba_delete_table()
dba_verify_empty_form_submit in ./dba.module

File

./dba.module, line 1476
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_delete_table($table) {
  if (_is_mysql()) {
    $query = "DELETE FROM {$table};";
  }
  else {
    drupal_set_message(t('Support for deleting the contents of tables is not currently available in PostgreSQL.'), 'error');
    return;
  }
  drupal_set_message(check_plain($query));
  return db_query($query);
}