function dba_delete_row_submit in Database Administration 5
File
- ./
dba.module, line 650 - 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_row_submit($form_id, $form_values) {
if (user_access('dba administer database')) {
$key = $form_values['key'];
$keyid = $form_values['keyid'];
$table = $form_values['table'];
$query = "DELETE FROM {$table} WHERE {$key} = '{$keyid}'";
drupal_set_message(check_plain($query));
$query = "DELETE FROM %s WHERE %s = '%s'";
db_query($query, $table, $key, $keyid);
}
return "admin/build/database/table/{$table}/view";
}