Answers.Body: <p>If you have separate databases then you need to enable CiviCRM Drupal views integration you need to add some information to the sites settings.php file.</p>
  
  <p>Visit - /civicrm/admin/setting/uf?reset=1</p>
  
  <p>Data from the above CiviCRM page needs to be copied and pasted into your sites settings.php file.</p>
  
  <p>Detailed info can be found <a href="https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/#drupal-7" rel="nofollow noreferrer">here</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-15T20:42:56.927Z
Answers.LastActivityDate: 2018-07-16T02:05:33.310Z
Answers.LastEditDate: 2018-07-16T02:05:33.310Z
Answers.UserDisplayName: Anil
Body: <p>I was trying to create a membership directory view in Drupal 7 but came across this error:</p>
  
  <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'egyptia2_ess.droe_civicrm_membership' doesn't exist
  </code></pre>
  
  <p>I created the view and selected Show CiviCRM Memberships for the Content, and then after clicked continue and edit, it gave me the above error.</p>
  
  <p>Double checking, I don't see that table in my MySQL database and am curious if there something I have to activate first prior to creating a view such as this one...</p>
  
  <p>I'd appreciate any help - Matt</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-15T21:43:27.057Z
Comments.Text: Note this is only an issue if you have Drupal and CiviCRM in two separate databases - and is one big advantage for Views builders for having them in a single database. You may also notice that the Views will have problems after an upgrade until you do an extra 'clear cache' in Drupal
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-15T22:02:32.350Z
Comments.Text: @petednz-fuzion - Actually, I'm receiving this error while both Drupal and CiviCRM are in the same database, and I can only confirm this because it is the only database on my server (and the settings references as well...) - Could you see any other causes for this error?
Comments.UserDisplayName: Matthew
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-16T02:05:08.707Z
Comments.Text: We often find we have to do an extra Clear Cache in Drupal after a civi upgrade as mentioned on my previous comment. have you tried that?
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal><drupal-views><directory>
Title: Creating Membership Directory using Views in Drupal 7
ThreadText: # Creating Membership Directory using Views in Drupal 7
  
  (Asked by: username_0 on 2018-07-15)
  
  I was trying to create a membership directory view in Drupal 7 but came across this error:
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'egyptia2_ess.droe_civicrm_membership' doesn't exist
  
  I created the view and selected Show CiviCRM Memberships for the Content, and then after clicked continue and edit, it gave me the above error.
  Double checking, I don't see that table in my MySQL database and am curious if there something I have to activate first prior to creating a view such as this one...
  I'd appreciate any help - Matt
  
  **Tags:** drupal, drupal-views, directory
  
  > **Comments:**
  > **username_1**: Note this is only an issue if you have Drupal and CiviCRM in two separate databases - and is one big advantage for Views builders for having them in a single database. You may also notice that the Views will have problems after an upgrade until you do an extra 'clear cache' in Drupal  
  > **username_0**: @petednz-fuzion - Actually, I'm receiving this error while both Drupal and CiviCRM are in the same database, and I can only confirm this because it is the only database on my server (and the settings references as well...) - Could you see any other causes for this error?  
  > **username_1**: We often find we have to do an extra Clear Cache in Drupal after a civi upgrade as mentioned on my previous comment. have you tried that?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-07-15. Score: 4 | Accepted answer
  
  If you have separate databases then you need to enable CiviCRM Drupal views integration you need to add some information to the sites settings.php file.
  
  Visit - /civicrm/admin/setting/uf?reset=1
  
  Data from the above CiviCRM page needs to be copied and pasted into your sites settings.php file.
  
  Detailed info can be found [here](https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/#drupal-7)
  
  
  ---
  
  