Just a quick point. You shouldn't really have 'delete' as a hyperlink. Any actions which affect your database should be a POST from a form submission.
The reason for this is simple. If your site is public and google or someone crawls your site it will hit all the delete hyperlinks (ignoring the javascript confirm) and hey-presto! vanished database.