You are here

function regcode_admin_list_action_delete in Registration codes 6

Mass delete rules

1 string reference to 'regcode_admin_list_action_delete'
regcode_admin_list_getactions in ./regcode.admin.php
Build form elmeents for all of the actions available

File

./regcode.admin.php, line 760
Functions and pages needed for the administration interface for the regcode module.

Code

function regcode_admin_list_action_delete() {

  // Build the query
  module_load_include('regcode.api', 'regcode', 'php');
  $query = 'DELETE FROM {regcode}';
  $query .= regcode_admin_list_getwhere();
  db_query($query);

  // Number of codes
  $num = db_affected_rows();
  drupal_set_message(t('#num codes have been deleted.', array(
    '#num' => $num,
  )));
  drupal_goto('admin/user/regcodes/list');
}