custom table view: delete/edit row D7 I've spent hours trying to find good examples or working scripts, but couldn't find anything yet. What I desire to achieve: I have a sortable table with database entries in it, each row has a edit and delete link with each its own ID. So far so good. Now I have to add the functionality to actually delete/edit DB rows. Im totally lost..

Its a custom module and don't want to use other modules to achieve this, so these answers are useless : Help needed for adding and edit &amp; delete link in a column in a view table

I also found this website

but the description is way too complicated and I think the whole script is incomplete. 

I've also tried the http://drupal.org/project/examples but that didn't get me any further 

does anyone have really good examples or a complete working module? 

thanks for your input
So first of all you want a page callback to handle the deleting. You either want to use confirm_form() or add a token to the link to avoid CSRF. node.module does the former, so I'd go with core. You can also use that as a reference: node_menu() (look for $items['node/%node/delete']), node_delete_confirm(), node_delete_confirm_submit().

Regarding the actual deleting, this page has some instructions. Please update the Q if you have specific issues.

Here's an example, not tested:

/**
 * Implements hook_menu().
 */
function MYMODULE_menu() {
  $items['MYMODULE/%/delete'] = array(
    'title' =&gt; 'Delete',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('MYMODULE_delete_confirm', 1),
    'access arguments' =&gt; array('PERMISSION_TO_CHECK'),
  );

  return $items;
}

/**
 * Form function returning a delete thingy confirmation form.
 */
function MYMODULE_delete_confirm($form, &amp;$form_state, $id) {
  $form['#MYMODULE']['id'] = $id;

  $name = MYMODULE_get_name_from_id($id);

  return confirm_form($form,
    t("Are you sure you want to delete %name?", array('%name' =&gt; $name)),
    '&lt;front&gt;',
    t("This action cannot be undone."),
    t("Delete"),
    t("Cancel")
  );
}

/**
 * Submit handler for MYMODULE_delete_confirm.
 */
function MYMODULE_delete_confirm_submit($form, &amp;$form_state) {
  if (isset($form['#MYMODULE']['id'])) {
    $id = $form['#MYMODULE']['id'];
    db_delete('MYMODULE_thingy')
      -&gt;condition('id', $id)
      -&gt;execute();
  }
}

/**
 * Loads the name of the thingy from its id.
 */
function MYMODULE_get_name_from_id($id) {
  return 'thingy ' . $id;
}