Index: commentmail.actions.inc
===================================================================
--- commentmail.actions.inc	(revision 5088)
+++ commentmail.actions.inc	(working copy)
@@ -217,8 +217,7 @@
   cache_clear_all();
 
   // Now, ban the user.
-  $aid = db_last_insert_id('access','aid');
-  db_query("INSERT INTO {access} (aid, mask, type, status) VALUES ('%s', '%s', 'host', 0)", $aid, $comment->hostname);
+  db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', 'host', 0)", $comment->hostname);
 
   drupal_set_message(t('The host %host has been banned.', array('%host' => $comment->hostname)));
 
