There is a database of a working site on Drupal 7. Recently there were records when editing goods

a:12:{s:8:"cell_0_0";s:0:"";s:8:"cell_0_1";s:0:"";s:8:"cell_1_0";s:0:"";s:8:"cell_1_1";s:0:"";s:8:"cell_2_0";s:0:"";s:8:"cell_2_1";s:0:"";s:8:"cell_3_0";s:0:"";s:8:"cell_3_1";s:0:"";s:7:"caption";s:0:"";s:7:"rebuild";a:3:{s:10:"count_cols";i:2;s:10:"count_rows";i:4;s:7:"rebuild";s:37:"Перестроить таблицу";}s:6:"import";a:2:{s:4:"file";s:0:"";s:6:"import";s:22:"Загрузить CSV";}s:5:"paste";a:3:{s:15:"paste_delimiter";s:0:"";s:4:"data";s:0:"";s:12:"paste_import";s:16:"Import & Rebuild";}} 

This appears in the product card in the form of empty tables is added to the field_data_field_spec table, where the characteristics and equipment of the product are located (2 types of tables)

Who will prompt the SQL query to remove all such duplicate rows at once from the table? Well, after (if it is solved - it will be a miracle) - can someone come across such a problem on the drupal? with generation of empty tables

    2 answers 2

     DELETE FROM field_data_field_spec WHERE field_spec_value='a:12:{s:8:"cell_0_0";s:0:"";s:8:"cell_0_1";s:0:"";s:8:"cell_1_0";s:0:"";s:8:"cell_1_1";s:0:"";s:8:"cell_2_0";s:0:"";s:8:"cell_2_1";s:0:"";s:8:"cell_3_0";s:0:"";s:8:"cell_3_1";s:0:"";s:7:"caption";s:0:"";s:7:"rebuild";a:3:{s:10:"count_cols";i:2;s:10:"count_rows";i:4;s:7:"rebuild";s:37:"Перестроить таблицу";}s:6:"import";a:2:{s:4:"file";s:0:"";s:6:"import";s:22:"Загрузить CSV";}s:5:"paste";a:3:{s:15:"paste_delimiter";s:0:"";s:4:"data";s:0:"";s:12:"paste_import";s:16:"Import & Rebuild";}}' 

    or more correctly for such as I first walk and then select all

     SELECT FROM field_data_field_spec WHERE field_spec_value='a:12:{s:8:"cell_0_0";s:0:"";s:8:"cell_0_1";s:0:"";s:8:"cell_1_0";s:0:"";s:8:"cell_1_1";s:0:"";s:8:"cell_2_0";s:0:"";s:8:"cell_2_1";s:0:"";s:8:"cell_3_0";s:0:"";s:8:"cell_3_1";s:0:"";s:7:"caption";s:0:"";s:7:"rebuild";a:3:{s:10:"count_cols";i:2;s:10:"count_rows";i:4;s:7:"rebuild";s:37:"Перестроить таблицу";}s:6:"import";a:2:{s:4:"file";s:0:"";s:6:"import";s:22:"Загрузить CSV";}s:5:"paste";a:3:{s:15:"paste_delimiter";s:0:"";s:4:"data";s:0:"";s:12:"paste_import";s:16:"Import & Rebuild";}}' 

    correct anyone versed in this!

       SELECT `entity_type` , `bundle` , `deleted` , `entity_id` , `revision_id` , `language` , `delta` , `field_spec_value` , `field_spec_format` FROM `field_data_field_spec` WHERE `field_spec_value` = 'a:12:{s:8:"cell_0_0";s:0:"";s:8:"cell_0_1";s:0:"";s:8:"cell_1_0";s:0:"";s:8:"cell_1_1";s:0:"";s:8:"cell_2_0";s:0:"";s:8:"cell_2_1";s:0:"";s:8:"cell_3_0";s:0:"";s:8:"cell_3_1";s:0:"";s:7:"caption";s:0:"";s:7:"rebuild";a:3:{s:10:"count_cols";i:2;s:10:"count_rows";i:4;s:7:"rebuild";s:37:"Перестроить таблицу";}s:6:"import";a:2:{s:4:"file";s:0:"";s:6:"import";s:22:"Загрузить CSV";}s:5:"paste";a:3:{s:15:"paste_delimiter";s:0:"";s:4:"data";s:0:"";s:12:"paste_import";s:16:"Import & Rebuild";}}' 

      all empty tables issued!