Base table or view not found: 1146 Table 'odddrupal.system' doesn't exist: SELECT name FROM system WHERE type = 'module' AND name <> 'tadaa' ORDER BY name ASC; Array ( ) in tadaa_module_configuration_form()

This happened for me on a site where the table prefixes has been changed. Of course the table can't be found, since the query that's passed to db_query() hasn't encapsulated the table names.

We need to make sure that every database table is incapsulated within { and }, as they should be, according to Drupal's documentation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bhide.nishad’s picture

Assigned: Unassigned » bhide.nishad
FileSize
704 bytes

Encapsulated query in db_select instead of {} or db_query.

bhide.nishad’s picture

Status: Active » Needs review
bhide.nishad’s picture

Status: Needs review » Needs work
bhide.nishad’s picture

Assigned: bhide.nishad » Unassigned
Status: Needs work » Needs review
FileSize
788 bytes

Encapsulated query in db_select instead of {} or db_query.

Adding patch with correct diff.