You are here

function dba_empty_tables in Database Administration 7

Truncate table(s).

1 string reference to 'dba_empty_tables'
dba_menu in ./dba.module
Implements hook_menu().

File

./dba.admin.inc, line 509

Code

function dba_empty_tables() {
  if ($tables = _dba_active_tables()) {
    $form = array();
    $form['empty_tables'] = array(
      '#type' => 'hidden',
      '#value' => serialize($tables),
    );
    return confirm_form($form, t('Are you sure you want to delete all contents from the following tables: "%tables"?', array(
      '%tables' => implode(', ', $tables),
    )), 'admin/structure/dba', t('All data will be truncated from the listed tables.  This action cannot be undone.'), t('Empty'), t('Cancel'));
  }
  drupal_goto('admin/structure/dba');
}