diff --git a/chatroom.module b/chatroom.module
index c075104..5ac36c1 100644
--- a/chatroom.module
+++ b/chatroom.module
@@ -172,6 +172,21 @@ function chatroom_field_update($entity_type, $entity, $field, $instance, $langco
 }
 
 /**
+ * Implements hook_field_delete().
+ */
+function chatroom_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as $item) {
+    $tables = db_find_tables('chatroom%');
+    foreach ($tables as $table) {
+      $sql = "DELETE
+              FROM {$table}
+              WHERE cid = :cid";
+      db_query($sql, array(':cid' => $item['cid']));
+    }
+  }
+}
+
+/**
  * Implements hook_field_load().
  */
 function chatroom_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
