Answers.Body: <p>Does your database have InnoDB enabled and are all of Craft's tables using it (except for <code>searchindex</code>, which is MyISAM)? Sounds like maybe when you deleted the field some cascading deletes that are set on foreign keys didn't occur and that can happen if you're on MyISAM (which doesn't have foreign key support).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-31T20:04:12.213Z
Answers.Text: I just checked the admin/utils and it has MySQL InnoDB support with a green tick beside it so I assume it's enabled.
  On checking the status: SHOW TABLE STATUS FROM `db`;
  All tables areusing InnoDB apart from the craft_searchindex which is MyISAM - should it be InnoDB as well?
Answers.UserDisplayName: mmc501
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-31T20:41:04.017Z
Answers.Text: craft_searchindex is the odd one out (needs to do full text searches)
Answers.UserDisplayName: Marion Newlevant
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-31T17:26:11.770Z
Answers.LastActivityDate: 2015-08-31T21:12:25.263Z
Answers.LastEditDate: 2015-08-31T21:12:25.263Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>I ran into this issue recently updating a Craft 3.0.37 site to 3.2.x </p>
  
  <p>The issue turned out to be SuperTable plugin which also needed to be updated to more recent version.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T15:56:42.890Z
Answers.LastActivityDate: 2019-10-25T15:56:42.890Z
Answers.UserDisplayName: Alex Aguilar
Body: <p>I am trying to update an entry in a structure but getting the error:</p>
  
  <pre><code>CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nisp.craft_matrixcontent_colcontent' doesn't exist. The SQL statement executed was: SELECT `elements`.`id`, `elements`.`type`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_i18n`.`slug`, `elements_i18n`.`uri`, `elements_i18n`.`enabled` AS `localeEnabled`, `content`.`id` AS `contentId`, `matrixblocks`.`fieldId`, `matrixblocks`.`ownerId`, `matrixblocks`.`ownerLocale`, `matrixblocks`.`typeId`, `matrixblocks`.`sortOrder`
   FROM `craft_elements` `elements`
   JOIN `craft_elements_i18n` `elements_i18n` ON elements_i18n.elementId = elements.id
   JOIN `craft_matrixcontent_colcontent` `content` ON content.elementId = elements.id
   JOIN `craft_matrixblocks` `matrixblocks` ON matrixblocks.id = elements.id
   WHERE ((((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements.enabled = 1)) AND (elements_i18n.enabled = 1)) AND (matrixblocks.fieldId=:matrixblocksfieldId1)) AND (matrixblocks.ownerId=:matrixblocksownerId1)
   GROUP BY `elements`.`id`
   ORDER BY `matrixblocks`.`sortOrder` LIMIT 100. Bound with :locale='en_gb', :matrixblocksfieldId1='285', :matrixblocksownerId1='1656' 
  </code></pre>
  
  <p>The table it mentions is a matrix related table which does not exist - it was deleted a while back.
  It was used in a Matrix - Super Table - Matrix test but I was getting errors with it and decided not to use this then so deleted it.
  I only started to get this error when I added a new Matrix Field to this entryType. But I have emvoed the Matrix field and now I am still getting the error and can't update.
  Any idea's as to the resolution?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-31T07:58:55.433Z
Comments.Text: Have you cleared all your caches?
Comments.UserDisplayName: Marion Newlevant
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-31T09:05:49.590Z
Comments.Text: Yep tried that.
Comments.UserDisplayName: mmc501
Tags: <matrix><entry><error-message>
Title: Unable to Update Entry - Table doesn't exist
ThreadText: # Unable to Update Entry - Table doesn't exist
  
  (Asked by: username_0 on 2015-08-31)
  
  I am trying to update an entry in a structure but getting the error:
  
  ```
  CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nisp.craft_matrixcontent_colcontent' doesn't exist. The SQL statement executed was: SELECT `elements`.`id`, `elements`.`type`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_i18n`.`slug`, `elements_i18n`.`uri`, `elements_i18n`.`enabled` AS `localeEnabled`, `content`.`id` AS `contentId`, `matrixblocks`.`fieldId`, `matrixblocks`.`ownerId`, `matrixblocks`.`ownerLocale`, `matrixblocks`.`typeId`, `matrixblocks`.`sortOrder`
   FROM `craft_elements` `elements`
   JOIN `craft_elements_i18n` `elements_i18n` ON elements_i18n.elementId = elements.id
   JOIN `craft_matrixcontent_colcontent` `content` ON content.elementId = elements.id
   JOIN `craft_matrixblocks` `matrixblocks` ON matrixblocks.id = elements.id
   WHERE ((((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements.enabled = 1)) AND (elements_i18n.enabled = 1)) AND (matrixblocks.fieldId=:matrixblocksfieldId1)) AND (matrixblocks.ownerId=:matrixblocksownerId1)
   GROUP BY `elements`.`id`
   ORDER BY `matrixblocks`.`sortOrder` LIMIT 100. Bound with :locale='en_gb', :matrixblocksfieldId1='285', :matrixblocksownerId1='1656' 
  
  ```
  
  The table it mentions is a matrix related table which does not exist - it was deleted a while back.
  It was used in a Matrix - Super Table - Matrix test but I was getting errors with it and decided not to use this then so deleted it.
  I only started to get this error when I added a new Matrix Field to this entryType. But I have emvoed the Matrix field and now I am still getting the error and can't update.
  Any idea's as to the resolution?
  
  **Tags:** matrix, entry, error-message
  
  > **Comments:**
  > **username_1**: Have you cleared all your caches?  
  > **username_0**: Yep tried that.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-08-31. Score: 1
  
  Does your database have InnoDB enabled and are all of Craft's tables using it (except for `searchindex`, which is MyISAM)? Sounds like maybe when you deleted the field some cascading deletes that are set on foreign keys didn't occur and that can happen if you're on MyISAM (which doesn't have foreign key support).
  
  > **Comments:**
  > **username_0**: I just checked the admin/utils and it has MySQL InnoDB support with a green tick beside it so I assume it's enabled. On checking the status: SHOW TABLE STATUS FROM `db`; All tables areusing InnoDB apart from the craft_searchindex which is MyISAM - should it be InnoDB as well?  
  > **username_1**: craft_searchindex is the odd one out (needs to do full text searches)  
  
  ---
  
  ### Answer by username_3 on 2019-10-25. Score: 1
  
  I ran into this issue recently updating a Craft 3.0.37 site to 3.2.x
  
  The issue turned out to be SuperTable plugin which also needed to be updated to more recent version.
  
  
  ---
  
  